mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Cancel plot chat if message event is cancelled to allow for swear block/etc
This commit is contained in:
@ -553,8 +553,11 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onChat(PlayerChatEvent event) {
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
PlotPlayer plotPlayer = NukkitUtil.getPlayer(event.getPlayer());
|
||||
Location location = plotPlayer.getLocation();
|
||||
PlotArea area = location.getPlotArea();
|
||||
|
Reference in New Issue
Block a user