Cancel plot chat if message event is cancelled to allow for swear block/etc

This commit is contained in:
dordsor21
2018-10-25 10:51:18 +01:00
parent 302051a6ca
commit ea5ffbeb77
3 changed files with 11 additions and 2 deletions

View File

@ -757,8 +757,11 @@ public class PlayerEvents extends PlotListener implements Listener {
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
@EventHandler(priority = EventPriority.LOW)
public void onChat(AsyncPlayerChatEvent event) {
if (event.isCancelled())
return;
PlotPlayer plotPlayer = BukkitUtil.getPlayer(event.getPlayer());
Location location = plotPlayer.getLocation();
PlotArea area = location.getPlotArea();