mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-07 21:25:00 +00:00
changed event priorities
This commit is contained in:
@@ -42,7 +42,7 @@ public class BlocksMined implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler (priority = EventPriority.LOWEST)
|
@EventHandler (priority = EventPriority.HIGHEST)
|
||||||
public void onBreak(BlockBreakEvent event) {
|
public void onBreak(BlockBreakEvent event) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class ChunkPopulate implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onPopulate(ChunkPopulateEvent event) {
|
public void onPopulate(ChunkPopulateEvent event) {
|
||||||
if (event.getChunk().getWorld().getEnvironment() != World.Environment.THE_END) {
|
if (event.getChunk().getWorld().getEnvironment() != World.Environment.THE_END) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class CraftItem implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onCraft(CraftItemEvent event) {
|
public void onCraft(CraftItemEvent event) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class EntityDamage implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onDamage(EntityDamageByEntityEvent event) {
|
public void onDamage(EntityDamageByEntityEvent event) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class EntityDeath implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onDeath(EntityDeathEvent event) {
|
public void onDeath(EntityDeathEvent event) {
|
||||||
LivingEntity livingEntity = event.getEntity();
|
LivingEntity livingEntity = event.getEntity();
|
||||||
if (livingEntity instanceof Player) {
|
if (livingEntity instanceof Player) {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class GenerateLoot implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onGenerateLoot(LootGenerateEvent event) {
|
public void onGenerateLoot(LootGenerateEvent event) {
|
||||||
InventoryHolder inventoryHolder = event.getInventoryHolder();
|
InventoryHolder inventoryHolder = event.getInventoryHolder();
|
||||||
if (inventoryHolder == null) {
|
if (inventoryHolder == null) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class PickupItem implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onPickup(EntityPickupItemEvent event) {
|
public void onPickup(EntityPickupItemEvent event) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class PlayerFish implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onFish(PlayerFishEvent event) {
|
public void onFish(PlayerFishEvent event) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class SheepShear implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onShear(PlayerInteractEntityEvent event) {
|
public void onShear(PlayerInteractEntityEvent event) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class VillagerTrade implements Listener {
|
|||||||
this.toolStats = toolStats;
|
this.toolStats = toolStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onTrade(InventoryClickEvent event) {
|
public void onTrade(InventoryClickEvent event) {
|
||||||
if (event.isCancelled() || event.getCurrentItem() == null) {
|
if (event.isCancelled() || event.getCurrentItem() == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user