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

19 lines
872 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
2023-09-22 22:13:57 +02:00
index 45bfb32505dfd2a66d8a6ee4627ec293a88da818..2e4e90223160361e21e651c9dbcffdef7b235af7 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
2023-09-22 04:17:21 +02:00
@@ -1151,6 +1151,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();
this.doWhiteList = whitelistEnabled;
}