mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 01:00:18 +01:00
Push Changes
This commit is contained in:
parent
9644b41f7c
commit
9437efb08d
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user