mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 01:29:05 +00:00
Implemented Global NPC Events!
All NPCs activate these scripts. If a player wants to create a script that's universally used by all NPCs, this allows for that to happen with a lot of ease!
This commit is contained in:
1 parent
092592bd27
commit
18ff2bff78
15 files changed
+562
-38
No files matched your search
@@ -253,7 +253,7 @@ public class NoppesUtilPlayer {
|
||||
return;
|
||||
|
||||
EventHooks.onDialogOption(new DialogEvent.DialogOption(new ScriptPlayer((EntityPlayerMP) player), dialog));
|
||||
npc.script.callScript(EnumScriptType.DIALOG_CLOSE, "player", player, "dialog", dialogId, "option", optionId + 1);
|
||||
EventHooks.onNPCDialogClosed(npc,player,dialogId,optionId+1,dialog);
|
||||
|
||||
if(!dialog.hasDialogs(player) && !dialog.hasOtherOptions()) {
|
||||
EventHooks.onDialogClosed(new DialogEvent.DialogClosed(new ScriptPlayer((EntityPlayerMP) player), dialog));
|
||||
|
||||
Reference in new issue
Block a user