aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0281-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
blob: 02a80301153653b918710b2fe05969b44d77050f (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 9e8938627bfd1c45a2546e221f819e20c483a9e2..00c43d7b846e97e2cc2105c93be5ce918fafd775 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1126,6 +1126,7 @@ public abstract class PlayerList {
     }
 
     public void setUsingWhiteList(boolean whitelistEnabled) {
+        new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent(); // Paper - WhitelistToggleEvent
         this.doWhiteList = whitelistEnabled;
     }