Skip to content

Commit

Permalink
Add world.world_type tag
Browse files Browse the repository at this point in the history
  • Loading branch information
MusicScore committed Nov 10, 2018
1 parent fb063d5 commit 85fcda3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plugin/src/main/java/net/aufdemrand/denizen/objects/dWorld.java
Expand Up @@ -391,6 +391,21 @@ public String run(Attribute attribute, dObject object) {
}
});

// <-- [tag]
// @attribute <w@world.world_type>
// @returns Element
// @description
// Returns the world type of the world.
// Can return any enum from: <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/WorldType.html>
// -->
registerTag("world_type", new TagRunnable() {
@Override
public String run(Attribute attribute, dObject object) {
return new Element(((dWorld) object).getWorld().getWorldType().getName())
.getAttribute(attribute.fulfill(1));
}
});


/////////////////////
// IDENTIFICATION ATTRIBUTES
Expand Down

0 comments on commit 85fcda3

Please sign in to comment.