From 5f62a4b89cf426dacbaf82eaf43e40455e4679af Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 21 Jan 2017 15:17:39 -0800 Subject: [PATCH] Fixed ignore cancelled. --- .../askyblock/listeners/PlayerEvents.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java b/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java index 24a8cd7b1..3bec624b9 100644 --- a/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java +++ b/src/com/wasteofplastic/askyblock/listeners/PlayerEvents.java @@ -41,7 +41,6 @@ import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; -import org.bukkit.util.Vector; import com.wasteofplastic.askyblock.ASkyBlock; import com.wasteofplastic.askyblock.InventorySave; @@ -93,7 +92,7 @@ public void onHungerChange(final FoodLevelChangeEvent e) { * Places player back on their island if the setting is true * @param e */ - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onPlayerRespawn(final PlayerRespawnEvent e) { if (DEBUG) { plugin.getLogger().info(e.getEventName()); @@ -116,7 +115,7 @@ public void onPlayerRespawn(final PlayerRespawnEvent e) { * Places the player on the island respawn list if set * @param e */ - @EventHandler(priority = EventPriority.LOW, ignoreCancelled = false) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerDeath(final PlayerDeathEvent e) { if (DEBUG) { plugin.getLogger().info(e.getEventName()); @@ -148,7 +147,7 @@ public void onPlayerDeath(final PlayerDeathEvent e) { * This option helps reduce the down side of dying due to traps, etc. * Also handles muting of death messages */ - @EventHandler(priority = EventPriority.LOW, ignoreCancelled = false) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onVistorDeath(final PlayerDeathEvent e) { if (DEBUG) { plugin.getLogger().info(e.getEventName()); @@ -277,7 +276,7 @@ public void onPlayerFall(final PlayerMoveEvent e) { * * @param e */ - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onPlayerTeleport(final PlayerCommandPreprocessEvent e) { if (DEBUG) { plugin.getLogger().info(e.getEventName()); @@ -303,7 +302,7 @@ public void onPlayerTeleport(final PlayerCommandPreprocessEvent e) { * * @param e */ - @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = false) + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onPlayerTeleport(final PlayerTeleportEvent e) { if (DEBUG) { plugin.getLogger().info(e.getEventName()); @@ -595,7 +594,7 @@ public static void unsetFalling(UUID uniqueId) { * Prevents visitors from using commands on islands, like /spawner * @param e */ - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onVisitorCommand(final PlayerCommandPreprocessEvent e) { if (DEBUG) { plugin.getLogger().info("Visitor command " + e.getEventName() + ": " + e.getMessage()); @@ -619,7 +618,7 @@ public void onVisitorCommand(final PlayerCommandPreprocessEvent e) { * Prevents visitors from getting damage if invinciblevisitors option is set to TRUE * @param e */ - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onVisitorGetDamage(EntityDamageEvent e){ if(!Settings.invincibleVisitors) return; if(!(e.getEntity() instanceof Player)) return;