mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 08:45:11 +00:00
Added handler support to NPC API.
This commit is contained in:
1 parent
69f96519dc
commit
d50f51e208
40 files changed
+1471
-56
No files matched your search
@@ -2,9 +2,7 @@ package noppes.npcs.controllers;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -13,9 +11,12 @@ import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.NoppesStringUtils;
|
||||
import noppes.npcs.constants.EnumOptionType;
|
||||
import noppes.npcs.scripted.handler.IDialogHandler;
|
||||
import noppes.npcs.scripted.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.handler.data.IDialogCategory;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
|
||||
public class DialogController {
|
||||
public class DialogController implements IDialogHandler {
|
||||
public HashMap<Integer,DialogCategory> categories = new HashMap<Integer, DialogCategory>();
|
||||
public HashMap<Integer,Dialog> dialogs = new HashMap<Integer, Dialog>();
|
||||
public static DialogController instance;
|
||||
@@ -312,4 +313,12 @@ public class DialogController {
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public List<IDialogCategory> categories() {
|
||||
return new ArrayList(this.categories.values());
|
||||
}
|
||||
|
||||
public IDialog get(int id) {
|
||||
return (IDialog)this.dialogs.get(id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user