testserver/Spigot-Server-Patches/0334-Call-WhitelistToggleEv...

19 lines
803 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 13 Mar 2019 20:08:09 +0200
Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5be6a3d2ed8f51cb7490183ebb14ffe41cb0728d..fbb2ba9c9f3c63a9dfd242a4ae72ec609cbe9609 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1058,6 +1058,7 @@ public abstract class PlayerList {
}
public void setHasWhitelist(boolean flag) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(flag).callEvent();
this.hasWhitelist = flag;
}