diff --git a/src/main/java/org/purpurmc/purpurextras/modules/ForceNametaggedForRidingModule.java b/src/main/java/org/purpurmc/purpurextras/modules/ForceNametaggedForRidingModule.java index f3c74e5..7dc575f 100644 --- a/src/main/java/org/purpurmc/purpurextras/modules/ForceNametaggedForRidingModule.java +++ b/src/main/java/org/purpurmc/purpurextras/modules/ForceNametaggedForRidingModule.java @@ -1,12 +1,12 @@ package org.purpurmc.purpurextras.modules; import io.papermc.paper.event.entity.EntityMoveEvent; +import org.bukkit.event.entity.EntityMountEvent; import org.purpurmc.purpurextras.PurpurExtras; import org.bukkit.entity.*; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.spigotmc.event.entity.EntityMountEvent; /** * If enabled, only nametagged mobs can be mounted/steered using purpur's rideable option. diff --git a/src/main/java/org/purpurmc/purpurextras/modules/LightningTransformsMobsModule.java b/src/main/java/org/purpurmc/purpurextras/modules/LightningTransformsMobsModule.java index ad28cac..1f112b4 100644 --- a/src/main/java/org/purpurmc/purpurextras/modules/LightningTransformsMobsModule.java +++ b/src/main/java/org/purpurmc/purpurextras/modules/LightningTransformsMobsModule.java @@ -61,7 +61,7 @@ public boolean shouldEnable() { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onLightningStrike(EntityDamageByEntityEvent event) { - if (!event.getDamager().getType().equals(EntityType.LIGHTNING)) return; + if (!event.getDamager().getType().equals(EntityType.LIGHTNING_BOLT)) return; Entity entity = event.getEntity(); if (!(entity instanceof LivingEntity livingEntity)) return; if (entity.getEntitySpawnReason().equals(CreatureSpawnEvent.SpawnReason.LIGHTNING)) { diff --git a/src/main/java/org/purpurmc/purpurextras/modules/NoFallDamageWhileHavingJumpBoostModule.java b/src/main/java/org/purpurmc/purpurextras/modules/NoFallDamageWhileHavingJumpBoostModule.java index 345c425..ed1672b 100644 --- a/src/main/java/org/purpurmc/purpurextras/modules/NoFallDamageWhileHavingJumpBoostModule.java +++ b/src/main/java/org/purpurmc/purpurextras/modules/NoFallDamageWhileHavingJumpBoostModule.java @@ -30,7 +30,7 @@ public boolean shouldEnable() { public void onFallDamage(EntityDamageEvent event){ if (!EntityDamageEvent.DamageCause.FALL.equals(event.getCause())) return; if (!(event.getEntity() instanceof LivingEntity livingEntity)) return; - if (!livingEntity.hasPotionEffect(PotionEffectType.JUMP)) return; + if (!livingEntity.hasPotionEffect(PotionEffectType.JUMP_BOOST)) return; event.setCancelled(true); } } diff --git a/src/main/java/org/purpurmc/purpurextras/util/ItemStackUtil.java b/src/main/java/org/purpurmc/purpurextras/util/ItemStackUtil.java index 905c8ab..6dc16d0 100644 --- a/src/main/java/org/purpurmc/purpurextras/util/ItemStackUtil.java +++ b/src/main/java/org/purpurmc/purpurextras/util/ItemStackUtil.java @@ -22,7 +22,7 @@ public static boolean damage(ItemStack itemStack, int amount, boolean ignoreUnbr ItemMeta meta = itemStack.getItemMeta(); Damageable damageable = (Damageable) itemStack.getItemMeta(); if (amount > 0) { - int unbreaking = meta.getEnchantLevel(Enchantment.DURABILITY); + int unbreaking = meta.getEnchantLevel(Enchantment.UNBREAKING); int reduce = 0; for (int i = 0; unbreaking > 0 && i < amount; ++i) { if (reduceDamage(itemStack, ThreadLocalRandom.current(), unbreaking)) {