Implemented animation events and made some event classes abstract.

This commit is contained in:
Luis C.M committed 2024-03-24 17:03:58 -05:00
1 parent a564bcdb0e
commit 61781710f1
18 files changed
+254 -46

No files matched your search

@@ -4,8 +4,9 @@ import noppes.npcs.api.IBlock;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.entity.IProjectile;
import noppes.npcs.api.event.IProjectileEvent;
import noppes.npcs.constants.EnumScriptType;
public class ProjectileEvent extends CustomNPCsEvent implements IProjectileEvent {
public abstract class ProjectileEvent extends CustomNPCsEvent implements IProjectileEvent {
public IProjectile projectile;
public IEntity source;
@@ -29,6 +30,11 @@ public class ProjectileEvent extends CustomNPCsEvent implements IProjectileEvent
public UpdateEvent(IProjectile projectile) {
super(projectile);
}
@Override
public String getHookName() {
return EnumScriptType.PROJECTILE_TICK.function;
}
}
/**
@@ -62,5 +68,10 @@ public class ProjectileEvent extends CustomNPCsEvent implements IProjectileEvent
return (IBlock) target;
return null;
}
@Override
public String getHookName() {
return EnumScriptType.PROJECTILE_IMPACT.function;
}
}
}