mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 03:25:02 +00:00
Added getHookName() function
This commit is contained in:
1 parent
8ea98cba9b
commit
681f62eeb6
12 files changed
+383
-3
No files matched your search
@@ -6,8 +6,9 @@ import noppes.npcs.api.event.ICustomGuiEvent;
|
||||
import noppes.npcs.api.gui.ICustomGui;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
|
||||
public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
public class CustomGuiEvent extends CustomNPCsEvent implements ICustomGuiEvent {
|
||||
public final IPlayer player;
|
||||
public final ICustomGui gui;
|
||||
|
||||
@@ -16,6 +17,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
this.gui = gui;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_EVENT.function;
|
||||
}
|
||||
|
||||
public IPlayer getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
@@ -36,6 +41,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
this.buttonId = buttonId;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_BUTTON.function;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.buttonId;
|
||||
}
|
||||
@@ -49,6 +58,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
this.textfieldId = textfieldId;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_TEXTFIELD.function;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.textfieldId;
|
||||
}
|
||||
@@ -58,6 +71,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
public CloseEvent(IPlayer player, ICustomGui gui) {
|
||||
super(player, gui);
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_CLOSED.function;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ScrollEvent extends CustomGuiEvent implements ICustomGuiEvent.ScrollEvent {
|
||||
@@ -74,6 +91,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
this.scrollIndex = scrollIndex;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_SCROLL.function;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.scrollId;
|
||||
}
|
||||
@@ -101,6 +122,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
this.stack = stack;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_SLOT.function;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.slotId;
|
||||
}
|
||||
@@ -128,6 +153,10 @@ public class CustomGuiEvent extends Event implements ICustomGuiEvent {
|
||||
this.clickType = clickType;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
return EnumScriptType.CUSTOM_GUI_SLOT_CLICKED.function;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.slotId;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user