Fix: Now ignores cancelled events.. naughty developer!

This commit is contained in:
addstar 2013-11-02 22:47:39 +11:00
parent 94486d011a
commit f5376af523
12 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,7 @@ import org.bukkit.event.block.BlockBreakEvent;
public class OnBlockBreakEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onBlockBreakEvent(BlockBreakEvent event) {
Player player = event.getPlayer();

View File

@ -11,7 +11,7 @@ import org.bukkit.event.block.BlockPlaceEvent;
public class OnBlockPlaceEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onBlockPlaceEvent(BlockPlaceEvent event) {
Player player = event.getPlayer();

View File

@ -19,7 +19,7 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
public class OnEntityDamageByEntityEvent implements Listener {
@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) {
Player player = null;
if (event.getEntity() instanceof Player) {

View File

@ -13,7 +13,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
public class OnEntityDamageEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onEntityDamageEvent(EntityDamageEvent event) {
Entity ent = event.getEntity();

View File

@ -11,7 +11,7 @@ import org.bukkit.event.entity.FoodLevelChangeEvent;
public class OnFoodLevelChangeEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onFoodLevelChangeEvent(FoodLevelChangeEvent event) {
Player player = (Player) event.getEntity();

View File

@ -22,7 +22,7 @@ import org.bukkit.inventory.ItemStack;
public class OnInventoryClickEvent implements Listener {
@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onInventoryClickEvent(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked();

View File

@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
public class OnInventoryCloseEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onInventoryCloseEvent(InventoryCloseEvent event) {
Inventory inv = event.getInventory();
if (inv.getType().equals(InventoryType.CHEST)) {

View File

@ -15,7 +15,7 @@ import org.bukkit.event.player.PlayerCommandPreprocessEvent;
public class OnPlayerCommandPreprocessEvent implements Listener {
@EventHandler(priority = EventPriority.HIGH)
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled=true)
public void onPlayerCommandPreprocessEvent(
PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();

View File

@ -11,7 +11,7 @@ import org.bukkit.event.player.PlayerDropItemEvent;
public class OnPlayerDropItemEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onPlayerDropItemEvent(PlayerDropItemEvent event) {
Player player = event.getPlayer();

View File

@ -31,7 +31,7 @@ import org.bukkit.inventory.meta.ItemMeta;
public class OnPlayerInteractEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onPlayerInteractEvent(PlayerInteractEvent event) {
Player player = event.getPlayer();
Block block = event.getClickedBlock();

View File

@ -15,7 +15,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
public class OnPlayerMoveEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onPlayerMoveEvent(PlayerMoveEvent event) {
Player player = event.getPlayer();

View File

@ -14,7 +14,7 @@ import org.bukkit.event.block.SignChangeEvent;
public class OnSignChangeEvent implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled=true)
public void onSignChangeEvent(SignChangeEvent event) {
Player player = event.getPlayer();
String[] lines = event.getLines();