Remove unused imports

This commit is contained in:
ThatCreeper 2021-01-02 17:08:59 -06:00
parent 30be7b5b81
commit 30868df243
3 changed files with 9 additions and 8 deletions

View File

@ -10,7 +10,12 @@ import net.minestom.server.data.Data;
import net.minestom.server.data.DataContainer;
import net.minestom.server.event.Event;
import net.minestom.server.event.EventCallback;
import net.minestom.server.event.entity.*;
import net.minestom.server.event.entity.EntityDeathEvent;
import net.minestom.server.event.entity.EntitySpawnEvent;
import net.minestom.server.event.entity.EntityTickEvent;
import net.minestom.server.event.entity.EntityVelocityEvent;
import net.minestom.server.event.entity.EntityPotionAddEvent;
import net.minestom.server.event.entity.EntityPotionRemoveEvent;
import net.minestom.server.event.handler.EventHandler;
import net.minestom.server.instance.Chunk;
import net.minestom.server.instance.Instance;
@ -407,7 +412,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
if (time >= timedPotion.getStartingTime() + potionTime) {
// Send the packet that the potion should no longer be applied
timedPotion.getPotion().sendRemovePacket(this);
this.callEvent(EntityPotionRemoveEvent.class, new EntityPotionRemoveEvent(
callEvent(EntityPotionRemoveEvent.class, new EntityPotionRemoveEvent(
this,
timedPotion.getPotion()
));
@ -1482,7 +1487,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
this.effects.removeIf(timedPotion -> {
if (timedPotion.getPotion().getEffect() == effect) {
timedPotion.getPotion().sendRemovePacket(this);
this.callEvent(EntityPotionRemoveEvent.class, new EntityPotionRemoveEvent(
callEvent(EntityPotionRemoveEvent.class, new EntityPotionRemoveEvent(
this,
timedPotion.getPotion()
));
@ -1501,7 +1506,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
removeEffect(potion.getEffect());
this.effects.add(new TimedPotion(potion, System.currentTimeMillis()));
potion.sendAddPacket(this);
this.callEvent(EntityPotionAddEvent.class, new EntityPotionAddEvent(
callEvent(EntityPotionAddEvent.class, new EntityPotionAddEvent(
this,
potion
));

View File

@ -1,6 +1,5 @@
package net.minestom.server.potion;
import net.minestom.server.entity.Entity;
import org.jetbrains.annotations.NotNull;
public class TimedPotion {

View File

@ -9,7 +9,6 @@ import net.minestom.server.entity.*;
import net.minestom.server.entity.damage.DamageType;
import net.minestom.server.entity.type.monster.EntityZombie;
import net.minestom.server.entity.type.other.EntityEndCrystal;
import net.minestom.server.event.EntityEvent;
import net.minestom.server.event.GlobalEventHandler;
import net.minestom.server.event.entity.EntityAttackEvent;
import net.minestom.server.event.entity.EntityPotionAddEvent;
@ -31,8 +30,6 @@ import net.minestom.server.item.Material;
import net.minestom.server.network.ConnectionManager;
import net.minestom.server.network.packet.server.play.PlayerListHeaderAndFooterPacket;
import net.minestom.server.ping.ResponseDataConsumer;
import net.minestom.server.potion.Potion;
import net.minestom.server.timer.TaskBuilder;
import net.minestom.server.utils.PacketUtils;
import net.minestom.server.utils.Position;
import net.minestom.server.utils.Vector;