Skip to content

Commit

Permalink
add tag world.environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 1, 2016
1 parent affaaf2 commit fd5543b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugin/src/main/java/net/aufdemrand/denizen/objects/dWorld.java
Expand Up @@ -755,6 +755,20 @@ public String run(Attribute attribute, dObject object) {
}
});

// <--[tag]
// @attribute <w@world.environment>
// @returns Element
// @description
// Returns the environment of the world: NORMAL, NETHER, or THE_END.
// -->
registerTag("environment", new TagRunnable() {
@Override
public String run(Attribute attribute, dObject object) {
return new Element(((dWorld) object).getWorld().getEnvironment().name())
.getAttribute(attribute.fulfill(1));
}
});

/////////////////////
// DEBUG TAGS
/////////////////
Expand Down

0 comments on commit fd5543b

Please sign in to comment.