Paper/patches/server/0289-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
Jake Potrebic 1d7d7e92f2
301
2024-04-23 22:43:09 -07:00

19 lines
904 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/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 7112c6c77c5527f530223d5ffdf81c837a609b7c..f29cd4d7c528404ea8e77e82a5ae17a9d9d19ed5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1157,6 +1157,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent(); // Paper - WhitelistToggleEvent
this.doWhiteList = whitelistEnabled;
}