mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Renamed method in EntityDeathByEntityEvent
This commit is contained in:
parent
e3975a4c4b
commit
311251686d
@ -47,7 +47,7 @@ public class Fetching extends EcoEnchant {
|
||||
if(!(EnchantChecks.helmet(player, this)))
|
||||
return;
|
||||
|
||||
int xp = event.getDroppedExp();
|
||||
int xp = event.getXp();
|
||||
Collection<ItemStack> drops = event.getDrops();
|
||||
|
||||
new DropQueue(player)
|
||||
|
@ -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<ItemStack> drops = event.getDrops();
|
||||
|
||||
if(entity instanceof Player && Soulbound.getSoulboundItems((Player) entity) != null) {
|
||||
|
@ -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<ItemStack> 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;
|
||||
|
@ -28,10 +28,13 @@ 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) {
|
||||
events.remove(toRemove);
|
||||
|
Loading…
Reference in New Issue
Block a user