testserver/patches/server/0312-Call-WhitelistToggleEv...

19 lines
872 B
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
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
2021-11-24 01:53:24 +00:00
index e9447ac47a858fbc9e16559c18e377517b8089ac..601eb789e19efe4a2fa697c0b5e7c28b245f0990 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
2021-11-24 01:53:24 +00:00
@@ -1123,6 +1123,7 @@ public abstract class PlayerList {
2021-06-11 12:02:28 +00:00
}
public void setUsingWhiteList(boolean whitelistEnabled) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent();
this.doWhiteList = whitelistEnabled;
}