diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java index 882631dd6..5ff1aca60 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/types/TutorialGettingStarted.java @@ -3,6 +3,7 @@ package mineplex.game.clans.tutorials.types; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.player.AsyncPlayerChatEvent; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; @@ -66,6 +67,21 @@ public class TutorialGettingStarted extends Tutorial } } + @EventHandler(priority = EventPriority.LOWEST) + public void handlePlayerChat(AsyncPlayerChatEvent event) + { + for (TutorialClient player : _inTutorial.values()) + { + if (event.getPlayer().equals(player.getPlayer())) + { + event.setCancelled(true); + continue; + } + + event.getRecipients().remove(player.getPlayer()); + } + } + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onClansCommand(ClansCommandExecutedEvent event) {