mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 06:07:27 +00:00
Added global API.getActionManager()
This commit is contained in:
1 parent
6de09c1ee4
commit
e001beb6ba
3 files changed
+16
-2
No files matched your search
@@ -79,6 +79,7 @@ public class NpcAPI extends AbstractNpcAPI {
|
||||
private static final CacheHashMap<ItemStack, CacheHashMap.CachedObject<ScriptItemStack>> scriptItemCache = new CacheHashMap<>(60 * 1000);
|
||||
public static final HashMap<String, Object> engineObjects = new HashMap<>();
|
||||
public static final EventBus EVENT_BUS = new EventBus();
|
||||
public static final ScriptedActionManager actionManager = new ScriptedActionManager();
|
||||
private static AbstractNpcAPI instance = null;
|
||||
|
||||
private final static String API_USER_AGENT = "CNPC+API";
|
||||
@@ -559,6 +560,10 @@ public class NpcAPI extends AbstractNpcAPI {
|
||||
return container instanceof ContainerNpcInterface ? ContainerNpcInterface.getOrCreateIContainer((ContainerNpcInterface) container) : new ScriptContainer(container);
|
||||
}
|
||||
|
||||
public IActionManager getActionManager() {
|
||||
return actionManager;
|
||||
}
|
||||
|
||||
private void checkWorld() {
|
||||
if (CustomNpcs.getServer() == null || CustomNpcs.getServer().isServerStopped()) {
|
||||
throw new CustomNPCsException("No world is loaded right now");
|
||||
|
||||
Reference in new issue
Block a user