mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 07:59:08 +00:00
Implemented get/setDialog functions for ICustomNpc.
This commit is contained in:
1 parent
f9486c66a2
commit
156a976cdd
2 files changed
+31
-4
No files matched your search
@@ -672,17 +672,20 @@ public class NoppesUtilServer {
|
||||
}
|
||||
|
||||
public static DialogOption setNpcDialog(int slot, int dialogId, EntityPlayer player) throws IOException {
|
||||
EntityNPCInterface npc = getEditingNpc(player);
|
||||
return setNpcDialog(slot, dialogId, getEditingNpc(player));
|
||||
}
|
||||
|
||||
public static DialogOption setNpcDialog(int slot, int dialogId, EntityNPCInterface npc) {
|
||||
if(npc == null)
|
||||
return null;
|
||||
if(!npc.dialogs.containsKey(slot))
|
||||
npc.dialogs.put(slot, new DialogOption());
|
||||
|
||||
|
||||
DialogOption option = npc.dialogs.get(slot);
|
||||
option.dialogId = dialogId;
|
||||
if(option.hasDialog())
|
||||
option.title = option.getDialog().title;
|
||||
|
||||
|
||||
return option;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user