Paper/patches/server/0286-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch

19 lines
904 B
Diff
Raw Normal View History

2021-06-11 14:02:28 +02: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
index 2a0d3319899f0b3f38135e25306b87b1974b3d83..28b81e29be07902ad4d04aeb18bffd49757c3029 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1158,6 +1158,7 @@ public abstract class PlayerList {
2021-06-11 14:02:28 +02:00
}
public void setUsingWhiteList(boolean whitelistEnabled) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent(); // Paper - WhitelistToggleEvent
2021-06-11 14:02:28 +02:00
this.doWhiteList = whitelistEnabled;
}