Paper/Spigot-Server-Patches/0335-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
Mariell Hoversholm 8a046c95a4 Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
5c77bd28 SPIGOT-6147: InventoryCloseEvent does not fire after closing player inventory
2020-10-01 10:33:58 -04:00

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 4f6784a80cd385dcc73b2b00b3865e8ce6546a9a..19d8497d691e0ec6f4451298dcf4b4831062d5ed 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1062,6 +1062,7 @@ public abstract class PlayerList {
}
public void setHasWhitelist(boolean flag) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(flag).callEvent();
this.hasWhitelist = flag;
}