Call WhitelistToggleEvent when whitelist is toggled

This commit is contained in:
Mark Vainomaa 2019-03-13 20:08:09 +02:00
parent 04c783377e
commit 19bd3b2655

View File

@ -917,7 +917,15 @@
}
public int getPlayerCount() {
@@ -786,11 +1136,35 @@
@@ -746,6 +1096,7 @@
}
public void setUsingWhiteList(boolean whitelistEnabled) {
+ new com.destroystokyo.paper.event.server.WhitelistToggleEvent(whitelistEnabled).callEvent(); // Paper - WhitelistToggleEvent
this.doWhiteList = whitelistEnabled;
}
@@ -786,11 +1137,35 @@
}
public void removeAll() {
@ -955,7 +963,7 @@
public void broadcastSystemMessage(Component message, boolean overlay) {
this.broadcastSystemMessage(message, (entityplayer) -> {
@@ -819,24 +1193,43 @@
@@ -819,24 +1194,43 @@
}
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
@ -1002,7 +1010,7 @@
}
if (flag1 && sender != null) {
@@ -845,20 +1238,27 @@
@@ -845,20 +1239,27 @@
}
@ -1035,7 +1043,7 @@
Path path = file2.toPath();
if (FileUtil.isPathNormalized(path) && FileUtil.isPathPortable(path) && path.startsWith(file.getPath()) && file2.isFile()) {
@@ -867,7 +1267,7 @@
@@ -867,7 +1268,7 @@
}
serverstatisticmanager = new ServerStatsCounter(this.server, file1);
@ -1044,7 +1052,7 @@
}
return serverstatisticmanager;
@@ -875,13 +1275,13 @@
@@ -875,13 +1276,13 @@
public PlayerAdvancements getPlayerAdvancements(ServerPlayer player) {
UUID uuid = player.getUUID();
@ -1060,7 +1068,7 @@
}
advancementdataplayer.setPlayer(player);
@@ -932,15 +1332,28 @@
@@ -932,15 +1333,28 @@
}
public void reloadResources() {