13
0
geforkt von Mirrors/Paper
Paper/patches/server/0281-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
Jake Potrebic ba163e10bb
585/1053
2024-06-13 16:32:45 -07:00

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