Skip to content

Commit

Permalink
Rewrote all the tags in dChunk.java in the new registerTag format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Talamar1 committed Jul 23, 2015
1 parent f5dac10 commit 8e09282
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 91 deletions.
15 changes: 8 additions & 7 deletions src/main/java/net/aufdemrand/denizen/Denizen.java
Expand Up @@ -702,22 +702,23 @@ public void onEnable() {
ScriptEvent.registerScriptEvent(new WorldUnloadsScriptEvent());


ObjectFetcher.registerWithObjectFetcher(dItem.class); // i@
ObjectFetcher.registerWithObjectFetcher(dBiome.class); // b@
dBiome.registerTags(); // TODO: Automate this once all classes have tag registries
ObjectFetcher.registerWithObjectFetcher(dChunk.class); // ch@
dChunk.registerTags(); // TODO: Automate this once all classes have tag registries
ObjectFetcher.registerWithObjectFetcher(dColor.class); // co@
ObjectFetcher.registerWithObjectFetcher(dCuboid.class); // cu@
ObjectFetcher.registerWithObjectFetcher(dEllipsoid.class); // ellipsoid@
ObjectFetcher.registerWithObjectFetcher(dEntity.class); // e@
ObjectFetcher.registerWithObjectFetcher(dInventory.class); // in@
ObjectFetcher.registerWithObjectFetcher(dColor.class); // co@
ObjectFetcher.registerWithObjectFetcher(dItem.class); // i@
ObjectFetcher.registerWithObjectFetcher(dLocation.class); // l@
ObjectFetcher.registerWithObjectFetcher(dMaterial.class); // m@
if (Depends.citizens != null)
ObjectFetcher.registerWithObjectFetcher(dNPC.class); // n@
ObjectFetcher.registerWithObjectFetcher(dPlayer.class); // p@
ObjectFetcher.registerWithObjectFetcher(dWorld.class); // w@
ObjectFetcher.registerWithObjectFetcher(dChunk.class); // ch@
ObjectFetcher.registerWithObjectFetcher(dPlugin.class); // pl@
ObjectFetcher.registerWithObjectFetcher(dEllipsoid.class); // ellipsoid@
ObjectFetcher.registerWithObjectFetcher(dBiome.class); // b@
dBiome.registerTags(); // TODO: Automate this once all classes have tag registries
ObjectFetcher.registerWithObjectFetcher(dWorld.class); // w@


// Register Core dObjects with the ObjectFetcher
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dBiome.java
Expand Up @@ -233,7 +233,7 @@ else if (attribute.startsWith("water"))
}
});
}

public static HashMap<String, TagRunnable> registeredTags = new HashMap<String, TagRunnable>();

public static void registerTag(String name, TagRunnable runnable) {
Expand Down

0 comments on commit 8e09282

Please sign in to comment.