diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/attackenemy/LoadCannonGoal.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/attackenemy/LoadCannonGoal.java index 81ca051c6..21b69d371 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/attackenemy/LoadCannonGoal.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/attackenemy/LoadCannonGoal.java @@ -1,5 +1,7 @@ package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.attackenemy; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -8,6 +10,8 @@ import mineplex.core.common.util.UtilInv; import mineplex.game.clans.clans.siege.events.LoadSiegeWeaponEvent; import mineplex.game.clans.tutorial.objective.ObjectiveGoal; import mineplex.game.clans.tutorial.tutorials.clans.objective.AttackEnemyObjective; +import org.bukkit.event.EventPriority; +import org.bukkit.event.block.BlockPlaceEvent; public class LoadCannonGoal extends ObjectiveGoal { @@ -43,4 +47,15 @@ public class LoadCannonGoal extends ObjectiveGoal finish(event.getPlayer()); } + + @EventHandler (priority = EventPriority.MONITOR) + public void onBlockPlace(BlockPlaceEvent event) + { + if (!contains(event.getPlayer())) + { + return; + } + UtilPlayer.message(event.getPlayer(), F.main("Clans", "Are you sure? That's the only TNT you have!")); + event.setCancelled(true); + } }