PaperMC/Spigot-Server-Patches/0334-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
Riley Park 4e958e229f
We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-02-21 20:45:33 +01:00

18 lines
803 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/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ce62e3706bb69068d3baa875ea9d227a9c3a9465..7e8178421c43fa3f555b1a30aa15512ab5b3b403 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1062,6 +1062,7 @@ public abstract class PlayerList {
}
public void setHasWhitelist(boolean flag) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(flag).callEvent();
this.hasWhitelist = flag;
}