diff --git a/plugin.yml b/plugin.yml index 4968806..0c27bb8 100644 --- a/plugin.yml +++ b/plugin.yml @@ -5,7 +5,7 @@ authors: [totemo, bermudalocket] description: ${project.description} website: ${project.url} main: nu.nerd.safecrystals.SafeCrystals -api-version: 1.13 +api-version: 1.15 depend: [WorldGuard] diff --git a/pom.xml b/pom.xml index 7276336..18da9b2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ nu.nerd SafeCrystals ${project.name} - 1.0.3 + 1.0.4 jar Prevent Ender Crystals from exploding and breaking blocks or damaging entities. https://github.com/totemo/${project.name} @@ -30,7 +30,7 @@ org.spigotmc spigot-api - 1.13-R0.1-SNAPSHOT + 1.15.2-R0.1-SNAPSHOT com.sk89q.worldguard diff --git a/src/nu/nerd/safecrystals/SafeCrystals.java b/src/nu/nerd/safecrystals/SafeCrystals.java index 394919b..459a908 100644 --- a/src/nu/nerd/safecrystals/SafeCrystals.java +++ b/src/nu/nerd/safecrystals/SafeCrystals.java @@ -80,7 +80,7 @@ public void onEntityExplode(EntityExplodeEvent event) { * If the damager is a player who can build, drop the crystal as an item. * Projectiles are handled the same as the player who shot them. */ - @EventHandler() + @EventHandler(ignoreCancelled = true) public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { Entity entity = event.getEntity(); if (entity.getType() == EntityType.ENDER_CRYSTAL) { @@ -110,7 +110,7 @@ public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { * when the player clicks the sides or underside of the block. Therefore, we * always check build permissions above the clicked block. */ - @EventHandler() + @EventHandler(ignoreCancelled = true) public void onPlayerInteract(PlayerInteractEvent event) { if (event.getMaterial() == Material.END_CRYSTAL && event.getAction() == Action.RIGHT_CLICK_BLOCK) { Block destination = event.getClickedBlock().getRelative(BlockFace.UP);