mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-14 13:14:44 +00:00
50 lines
1.1 KiB
Java
50 lines
1.1 KiB
Java
package noppes.npcs.api.event;
|
|
|
|
import cpw.mods.fml.common.eventhandler.Cancelable;
|
|
import noppes.npcs.api.IPos;
|
|
import noppes.npcs.api.IWorld;
|
|
import noppes.npcs.api.handler.data.INaturalSpawn;
|
|
|
|
/**
|
|
* Base interface for all CustomNPC+ script events.
|
|
*/
|
|
public interface ICustomNPCsEvent {
|
|
|
|
/** @return the script hook name that triggered this event. */
|
|
String getHookName();
|
|
|
|
/**
|
|
* @hookName onCNPCNaturalSpawn
|
|
*/
|
|
@Cancelable
|
|
interface CNPCNaturalSpawnEvent extends ICustomNPCsEvent {
|
|
INaturalSpawn getNaturalSpawn();
|
|
|
|
void setAttemptPosition(IPos attemptPosition);
|
|
|
|
IPos getAttemptPosition();
|
|
|
|
boolean animalSpawnPassed();
|
|
|
|
boolean monsterSpawnPassed();
|
|
|
|
boolean liquidSpawnPassed();
|
|
|
|
boolean airSpawnPassed();
|
|
}
|
|
|
|
interface ScriptedCommandEvent extends ICustomNPCsEvent {
|
|
IWorld getSenderWorld();
|
|
|
|
IPos getSenderPosition();
|
|
|
|
String getSenderName();
|
|
|
|
void setReplyMessage(String message);
|
|
|
|
String getId();
|
|
|
|
String[] getArgs();
|
|
}
|
|
}
|