Skip to content

Commit

Permalink
bug fixes and optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 23, 2021
1 parent 4fba45c commit 3bc80d0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions plugin/src/main/java/com/denizenscript/denizen/Denizen.java
Expand Up @@ -321,14 +321,14 @@ else if (javaVersion.startsWith("9") || javaVersion.startsWith("1.9") || javaVer
}
try {
AdjustCommand.specialAdjustables.put("server", ServerTagBase::adjustServer);
TagManager.registerCoreTags();
CommonRegistries.registerMainTagHandlers();
eventManager = new OldEventManager();
// Register all the modern script events
ScriptEventRegistry.registerMainEvents();
// Register Core ObjectTags with the ObjectFetcher
ObjectFetcher.registerCoreObjects();
CommonRegistries.registerMainObjects();
TagManager.registerCoreTags();
CommonRegistries.registerMainTagHandlers();
}
catch (Exception e) {
Debug.echoError(e);
Expand Down
Expand Up @@ -219,7 +219,7 @@ public static EntityTag valueOf(String string, TagContext context) {
}
else {
if (!allowDespawnedNpcs && context != null && context.showErrors()) {
Debug.echoDebug(context.entry, "NPC '" + string + "' is not spawned, errors may follow!");
Debug.echoDebug(context, "NPC '" + string + "' is not spawned, errors may follow!");
}
return new EntityTag(npc);
}
Expand Down
Expand Up @@ -2278,7 +2278,7 @@ else if ((object.inventory instanceof FurnaceInventory)) {
}
return null;
});
tagProcessor.registerFutureTagDeprecation("smelting", "input");
tagProcessor.registerFutureTagDeprecation("input", "smelting");

// <--[tag]
// @attribute <InventoryTag.advanced_matches[<matcher>]>
Expand Down
Expand Up @@ -37,9 +37,12 @@ public BukkitTagContext(PlayerTag player, NPCTag npc, ScriptEntry entry, boolean
}

public BukkitTagContext(ScriptEntry entry) {
super(entry == null || entry.shouldDebug(), entry, entry != null ? entry.getScript() : null);
player = entry != null ? ((BukkitScriptEntryData) entry.entryData).getPlayer() : null;
npc = entry != null ? ((BukkitScriptEntryData) entry.entryData).getNPC() : null;
super(entry);
if (entry != null) {
BukkitScriptEntryData data = (BukkitScriptEntryData) entry.entryData;
player = data.getPlayer();
npc = data.getNPC();
}
}

public BukkitTagContext(ScriptContainer container) {
Expand Down

0 comments on commit 3bc80d0

Please sign in to comment.