Added getHookName() function

This commit is contained in:
Luis C.M committed 2022-11-24 16:46:20 -06:00
1 parent 8ea98cba9b
commit 681f62eeb6
12 files changed
+383 -3

No files matched your search

@@ -10,6 +10,7 @@ import cpw.mods.fml.common.eventhandler.Event;
import noppes.npcs.api.IWorld;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.event.IForgeEvent;
import noppes.npcs.constants.EnumScriptType;
@Cancelable
public class ForgeEvent extends CustomNPCsEvent implements IForgeEvent {
@@ -23,6 +24,10 @@ public class ForgeEvent extends CustomNPCsEvent implements IForgeEvent {
return event;
}
public String getHookName() {
return EnumScriptType.FORGE_EVENT.function;
}
@Cancelable
public static class WorldEvent extends ForgeEvent implements IForgeEvent.WorldEvent {
public final IWorld world;
@@ -32,6 +37,10 @@ public class ForgeEvent extends CustomNPCsEvent implements IForgeEvent {
this.world = world;
}
public String getHookName() {
return EnumScriptType.FORGE_WORLD.function;
}
public IWorld getWorld() {
return world;
}
@@ -46,6 +55,10 @@ public class ForgeEvent extends CustomNPCsEvent implements IForgeEvent {
this.entity = entity;
}
public String getHookName() {
return EnumScriptType.FORGE_ENTITY.function;
}
public IEntity getEntity() {
return entity;
}
@@ -55,5 +68,9 @@ public class ForgeEvent extends CustomNPCsEvent implements IForgeEvent {
public InitEvent() {
super((Event)null);
}
public String getHookName() {
return EnumScriptType.FORGE_INIT.function;
}
}
}