aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0294-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
blob: 95dd0416b7beababdc1dca6501e3553c13fbcfe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 4221a45fda5c3b40a1f6342aebe8d7b2e190fb9c..3d13d3a219d10cb12bcdfe31eff9b54136629492 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1151,6 +1151,7 @@ public abstract class PlayerList {
     }
 
     public void setUsingWhiteList(boolean whitelistEnabled) {
+        new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent();
         this.doWhiteList = whitelistEnabled;
     }