diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java index 56e31284..4c4d29b8 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java @@ -47,7 +47,7 @@ public class Fetching extends EcoEnchant { if(!(EnchantChecks.helmet(player, this))) return; - int xp = event.getDroppedExp(); + int xp = event.getXp(); Collection drops = event.getDrops(); new DropQueue(player) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java index beee1629..698fe83e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java @@ -30,14 +30,14 @@ import java.util.Collection; import java.util.List; public class Telekinesis extends EcoEnchant { + private static boolean always = false; + public Telekinesis() { super( "telekinesis", EnchantmentType.NORMAL ); } - private static boolean always = false; - // START OF LISTENERS @Override @@ -128,7 +128,7 @@ public class Telekinesis extends EcoEnchant { if (!EnchantChecks.item(item, this)) return; if(this.getDisabledWorlds().contains(player.getWorld())) return; - int xp = event.getDroppedExp(); + int xp = event.getXp(); Collection drops = event.getDrops(); if(entity instanceof Player && Soulbound.getSoulboundItems((Player) entity) != null) { diff --git a/eco-util/src/main/java/com/willfp/eco/util/events/entitydeathbyentity/EntityDeathByEntityEvent.java b/eco-util/src/main/java/com/willfp/eco/util/events/entitydeathbyentity/EntityDeathByEntityEvent.java index b8f43989..8541f170 100644 --- a/eco-util/src/main/java/com/willfp/eco/util/events/entitydeathbyentity/EntityDeathByEntityEvent.java +++ b/eco-util/src/main/java/com/willfp/eco/util/events/entitydeathbyentity/EntityDeathByEntityEvent.java @@ -30,7 +30,7 @@ public class EntityDeathByEntityEvent extends Event { * The {@link Entity} that killed. */ @Getter - private final Entity damager; + private final Entity killer; /** * The associated {@link EntityDeathEvent}. @@ -54,18 +54,18 @@ public class EntityDeathByEntityEvent extends Event { * Create event based off parameters. * * @param victim The killed entity - * @param damager The killer + * @param killer The killer * @param drops The item drops * @param xp The amount of xp to drop * @param deathEvent The associated {@link EntityDeathEvent} */ public EntityDeathByEntityEvent(@NotNull final LivingEntity victim, - @NotNull final Entity damager, + @NotNull final Entity killer, @NotNull final List drops, final int xp, @NotNull final EntityDeathEvent deathEvent) { this.victim = victim; - this.damager = damager; + this.killer = killer; this.drops = drops; this.xp = xp; this.deathEvent = deathEvent; diff --git a/eco-util/src/main/java/com/willfp/eco/util/events/naturalexpgainevent/NaturalExpGainListeners.java b/eco-util/src/main/java/com/willfp/eco/util/events/naturalexpgainevent/NaturalExpGainListeners.java index 8373458e..a71e48ea 100644 --- a/eco-util/src/main/java/com/willfp/eco/util/events/naturalexpgainevent/NaturalExpGainListeners.java +++ b/eco-util/src/main/java/com/willfp/eco/util/events/naturalexpgainevent/NaturalExpGainListeners.java @@ -28,9 +28,12 @@ public class NaturalExpGainListeners implements Listener { NaturalExpGainBuilder toRemove = null; for (NaturalExpGainBuilder searchBuilder : events) { - if (!searchBuilder.getLocation().getWorld().equals(event.getPlayer().getLocation().getWorld())) continue; - if (searchBuilder.getReason().equals(NaturalExpGainBuilder.BuildReason.BOTTLE) && searchBuilder.getLocation().distanceSquared(event.getPlayer().getLocation()) > 52) + if (!searchBuilder.getLocation().getWorld().equals(event.getPlayer().getLocation().getWorld())) { + continue; + } + if (searchBuilder.getReason().equals(NaturalExpGainBuilder.BuildReason.BOTTLE) && searchBuilder.getLocation().distanceSquared(event.getPlayer().getLocation()) > 52) { toRemove = searchBuilder; + } } if (toRemove != null) {