Paper/patches/server/0314-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
2021-07-07 06:52:40 +00:00

19 lines
872 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 1f7376340248fc29734bab09715a28eab18849d1..2c17e723a1b1613c06b53c1e426c4ce1c072e8ad 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1123,6 +1123,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent();
this.doWhiteList = whitelistEnabled;
}