mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 23:09:05 +00:00
Important fix to some NPC hook scripts crashing, added option and dialog object fields to local NPC dialog and NPC dialog closed scripts
This commit is contained in:
1 parent
4abe8dca92
commit
65bb3b5939
8 files changed
+50
-16
No files matched your search
@@ -180,7 +180,7 @@ public class NoppesUtilServer {
|
||||
return item;
|
||||
}
|
||||
|
||||
public static void openDialog(EntityPlayer player, EntityNPCInterface npc, Dialog dia){
|
||||
public static void openDialog(EntityPlayer player, EntityNPCInterface npc, Dialog dia, int optionId){
|
||||
Dialog dialog = dia.copy(player);
|
||||
|
||||
EventHooks.onDialogOpen(new DialogEvent.DialogOpen(new ScriptPlayer((EntityPlayerMP) player), dialog));
|
||||
@@ -203,7 +203,7 @@ public class NoppesUtilServer {
|
||||
if(!data.dialogsRead.contains(dialog.id))
|
||||
data.dialogsRead.add(dialog.id);
|
||||
setEditingNpc(player, npc);
|
||||
EventHooks.onNPCDialog(npc, player, dialog.id, dialog);
|
||||
EventHooks.onNPCDialog(npc, player, dialog.id, optionId, dialog);
|
||||
}
|
||||
public static void runCommand(EntityPlayer player, String name, String command){
|
||||
runCommand(player, name, command, player);
|
||||
|
||||
Reference in new issue
Block a user