Push Changes

This commit is contained in:
Xephi 2014-10-23 10:50:28 +02:00
parent 9644b41f7c
commit 9437efb08d
2 changed files with 9 additions and 7 deletions

View File

@ -28,7 +28,7 @@ public class AuthMeEntityListener implements Listener {
this.instance = instance; this.instance = instance;
} }
@EventHandler @EventHandler (priority = EventPriority.LOWEST)
public void onEntityDamage(EntityDamageEvent event) { public void onEntityDamage(EntityDamageEvent event) {
if (event.isCancelled()) { if (event.isCancelled()) {
return; return;
@ -62,10 +62,11 @@ public class AuthMeEntityListener implements Listener {
} }
} }
player.setFireTicks(0); player.setFireTicks(0);
event.setDamage(0.0);
event.setCancelled(true); event.setCancelled(true);
} }
@EventHandler @EventHandler (priority = EventPriority.LOWEST)
public void onEntityTarget(EntityTargetEvent event) { public void onEntityTarget(EntityTargetEvent event) {
if (event.isCancelled()) { if (event.isCancelled()) {
return; return;
@ -96,7 +97,7 @@ public class AuthMeEntityListener implements Listener {
event.setCancelled(true); event.setCancelled(true);
} }
@EventHandler @EventHandler (priority = EventPriority.LOWEST)
public void onFoodLevelChange(FoodLevelChangeEvent event) { public void onFoodLevelChange(FoodLevelChangeEvent event) {
if (event.isCancelled()) { if (event.isCancelled()) {
return; return;
@ -154,10 +155,11 @@ public class AuthMeEntityListener implements Listener {
} }
} }
event.setAmount(0.0);
event.setCancelled(true); event.setCancelled(true);
} }
@EventHandler(priority = EventPriority.MONITOR) @EventHandler(priority = EventPriority.HIGHEST)
public void onEntityInteract(EntityInteractEvent event) { public void onEntityInteract(EntityInteractEvent event) {
if (event.isCancelled() || event == null) { if (event.isCancelled() || event == null) {
return; return;

View File

@ -916,7 +916,7 @@ public class AuthMePlayerListener implements Listener {
player.saveData(); player.saveData();
} }
@EventHandler(priority = EventPriority.MONITOR) @EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerPickupItem(PlayerPickupItemEvent event) { public void onPlayerPickupItem(PlayerPickupItemEvent event) {
if (event.isCancelled() || event.getPlayer() == null) { if (event.isCancelled() || event.getPlayer() == null) {
return; return;
@ -975,7 +975,7 @@ public class AuthMePlayerListener implements Listener {
event.setCancelled(true); event.setCancelled(true);
} }
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerInventoryOpen(InventoryOpenEvent event) { public void onPlayerInventoryOpen(InventoryOpenEvent event) {
if (event.isCancelled() || event.getPlayer() == null) if (event.isCancelled() || event.getPlayer() == null)
return; return;
@ -1002,7 +1002,7 @@ public class AuthMePlayerListener implements Listener {
player.closeInventory(); player.closeInventory();
} }
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerInventoryClick(InventoryClickEvent event) { public void onPlayerInventoryClick(InventoryClickEvent event) {
if (event.isCancelled() || event.getWhoClicked() == null) if (event.isCancelled() || event.getWhoClicked() == null)
return; return;