Fix: Now ignores cancelled events.. naughty developer!
This commit is contained in:
parent
94486d011a
commit
f5376af523
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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)) {
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user