Skip to content

Commit

Permalink
Some meta cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 7, 2016
1 parent 7504675 commit 0e65329
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
16 changes: 10 additions & 6 deletions src/main/java/net/aufdemrand/denizen/objects/dLocation.java
Expand Up @@ -758,7 +758,8 @@ else if (type == Material.TRAP_DOOR
// @returns Element
// @description
// Returns the formatted simple version of the dLocation's block coordinates.
// EG: X 'x', Y 'y', Z 'z', in world 'world'
// In the format: X 'x', Y 'y', Z 'z', in world 'world'
// For example, X '1', Y '2', Z '3', in world 'world_nether'
// -->
if (attribute.startsWith("simple.formatted")) {
return new Element("X '" + getBlockX()
Expand All @@ -772,7 +773,8 @@ else if (type == Material.TRAP_DOOR
// @returns Element
// @description
// Returns a simple version of the dLocation's block coordinates.
// EG: x,y,z,world
// In the format: x,y,z,world
// For example: 1,2,3,world_nether
// -->
if (attribute.startsWith("simple")) {
if (getWorld() == null) {
Expand Down Expand Up @@ -1477,7 +1479,8 @@ public int compare(dEntity ent1, dEntity ent2) {
// @returns Element
// @description
// Returns the location formatted for a Citizens command.
// EG: x.x:y.y:z.z:world
// In the format: x.x:y.y:z.z:world
// For example: 1.0:2.0:3.0:world_nether
// -->
if (attribute.startsWith("formatted.citizens")) {
return new Element(getX() + ":" + getY() + ":" + getZ() + ":" + getWorld().getName()).getAttribute(attribute.fulfill(2));
Expand All @@ -1488,7 +1491,8 @@ public int compare(dEntity ent1, dEntity ent2) {
// @returns Element
// @description
// Returns the formatted version of the dLocation.
// EG: 'X 'x.x', Y 'y.y', Z 'z.z', in world 'world'
// In the format: X 'x.x', Y 'y.y', Z 'z.z', in world 'world'
// For example: X '1.0', Y '2.0', Z '3.0', in world 'world_nether'
// -->
if (attribute.startsWith("formatted")) {
return new Element("X '" + getX()
Expand Down Expand Up @@ -2237,12 +2241,12 @@ && getBlock().getState() instanceof CreatureSpawner) {
// @name head_rotation
// @input Element(Number)
// @description
// Sets the rotation of the head at this location. Must be 1-16.
// Sets the rotation of the head at this location. Must be an integer 1 to 16.
// @tags
// <l@location.head_rotation>
// -->
if (mechanism.matches("head_rotation") && mechanism.requireInteger()) {
((Skull) getBlock().getState()).setRotation(getSkullBlockFace(value.asInt()-1));
((Skull) getBlock().getState()).setRotation(getSkullBlockFace(value.asInt() - 1));
}

// <--[mechanism]
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Expand Up @@ -824,7 +824,7 @@ public String getAttribute(Attribute attribute) {
// @attribute <p@player.money.currency_singular>
// @returns Element
// @description
// Returns the name of a single piece of currency - EG: Dollar
// Returns the name of a single piece of currency - For example: Dollar
// (Only if supported by the registered Economy system.)
// -->
if (attribute.startsWith("money.currency_singular")) {
Expand All @@ -836,7 +836,7 @@ public String getAttribute(Attribute attribute) {
// @attribute <p@player.money.currency>
// @returns Element
// @description
// Returns the name of multiple pieces of currency - EG: Dollars
// Returns the name of multiple pieces of currency - For example: Dollars
// (Only if supported by the registered Economy system.)
// -->
if (attribute.startsWith("money.currency")) {
Expand Down Expand Up @@ -2555,14 +2555,13 @@ public void adjust(Mechanism mechanism) {
// Shows the player a boss health bar with the specified text as a name.
// Use with no input value to remove the bar.
// Optionally, precede the text with a number indicating the health value
// based on an arbitrary scale of 0 to 200. EG:
// based on an arbitrary scale of 0 to 200. For example:
// - adjust <player> show_boss_bar:Hello
// - adjust <player> show_boss_bar:100|Hello
// NOTE: This will soon be replaced with a command!
// NOTE: This has been replaced by <@link command bossbar>!
// @tags
// None
// -->
// TODO: Command!
if (mechanism.matches("show_boss_bar")) {
if (!value.asString().isEmpty()) {
String[] split = value.asString().split("[\\|" + dList.internal_escape + "]", 2);
Expand Down
Expand Up @@ -145,7 +145,7 @@ public void adjust(Mechanism mechanism) {
// @description
// Sets the entity's framed item and optionally the rotation as well.
// Valid rotations: NONE, CLOCKWISE, FLIPPED, COUNTER_CLOCKWISE
// EG: framed:i@diamond_sword|clockwise
// For example: framed:i@diamond_sword|clockwise
// @tags
// <e@entity.is_frame>
// <e@entity.has_framed_item>
Expand Down
Expand Up @@ -66,7 +66,7 @@ public String getAttribute(Attribute attribute) {
// @group properties
// @description
// Returns a list of enchantments on the item, with their levels listed too.
// In the format of ENCHANTMENT,LEVEL - EG: DAMAGE_ALL,3
// In the format of ENCHANTMENT,LEVEL - For example: DAMAGE_ALL,3
// -->
if (attribute.startsWith("enchantments.with_levels")) {
if (enchantments.size() > 0) {
Expand Down
Expand Up @@ -1819,8 +1819,8 @@ public void registerCoreMembers() {
// You might choose to use this to record some important things, for example, every time a player
// uses a dangerous command you might log the player's name and their location, so you'll know
// who to blame if you find something damaged.
// Remember that the file location is inside the server's primary folder. You might want to prefix
// file names with a folder name, EG: 'file:logs/security.log'
// Remember that the file location is inside the server's primary folder. You most likely want to prefix
// file names with a folder name, For example: 'file:logs/security.log'
//
// Warning: Remember that file operations are dangerous! A typo in the filename could ruin your server.
// It's recommended you use this command minimally.
Expand Down

0 comments on commit 0e65329

Please sign in to comment.