aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0305-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0305-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch')
-rw-r--r--patches/server/0305-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0305-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0305-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
new file mode 100644
index 0000000000..90510e0728
--- /dev/null
+++ b/patches/server/0305-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mark Vainomaa <[email protected]>
+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/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
+index 97f045ee1af5479b2befe2e03f082933cfe91007..45cd4ac70bf322a3bb256579f795db46b9beb7a0 100644
+--- a/src/main/java/net/minecraft/server/players/PlayerList.java
++++ b/src/main/java/net/minecraft/server/players/PlayerList.java
+@@ -1129,6 +1129,7 @@ public abstract class PlayerList {
+ }
+
+ public void setUsingWhiteList(boolean whitelistEnabled) {
++ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent();
+ this.doWhiteList = whitelistEnabled;
+ }
+