Skip to content

Commit

Permalink
Make tag/mech meta self-consistent
Browse files Browse the repository at this point in the history
Mostly just the Element(x) - x is capital, 'Number' for an int,
'Decimal' for a number with a decimal on it (float/double)
there were also a few entirely incorrect return types I noticed and fix
  • Loading branch information
mcmonkey4eva committed Nov 2, 2013
1 parent cc5dd8f commit 388071e
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 97 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/aufdemrand/denizen/objects/Duration.java
Expand Up @@ -348,7 +348,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <d@duration.in_hours>
// @returns Element(double)
// @returns Element(Decimal)
// @description
// returns the number of hours in the Duration.
// -->
Expand All @@ -358,7 +358,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <d@duration.in_minutes>
// @returns Element(double)
// @returns Element(Decimal)
// @description
// returns the number of minutes in the Duration.
// -->
Expand All @@ -368,7 +368,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <d@duration.in_seconds>
// @returns Element(double)
// @returns Element(Decimal)
// @description
// returns the number of seconds in the Duration.
// -->
Expand All @@ -378,7 +378,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <d@duration.in_ticks>
// @returns Element(integer)
// @returns Element(Number)
// @description
// returns the number of ticks in the Duration. (20t/second)
// -->
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/net/aufdemrand/denizen/objects/Element.java
Expand Up @@ -209,7 +209,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <el@element.as_double>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the element as a number with a decimal.
// -->
Expand Down Expand Up @@ -324,7 +324,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <el@element.as_money>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the element as a number with two decimal places.
// -->
Expand Down Expand Up @@ -633,7 +633,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.abs>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the absolute value of the element.
// -->
Expand All @@ -644,7 +644,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.add[<#>]>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the element plus a number.
// -->
Expand All @@ -656,7 +656,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.div[<#>]>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the element divided by a number.
// -->
Expand All @@ -668,7 +668,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.mod[<#>]>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the remainder of the element divided by a number.
// -->
Expand All @@ -680,7 +680,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.mul[<#>]>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the element multiplied by a number.
// -->
Expand All @@ -692,7 +692,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.sqrt>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the square root of the element.
// -->
Expand All @@ -703,7 +703,7 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))

// <--[tag]
// @attribute <el@element.sub[<#>]>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the element minus a number.
// -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dChunk.java
Expand Up @@ -216,7 +216,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <ch@chunk.average_height>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// returns the average height of the blocks in the chunk.
// -->
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Expand Up @@ -1300,7 +1300,7 @@ else if (attribute.startsWith("equipment")) {

// <--[tag]
// @attribute <e@entity.fall_distance>
// @returns Element(Float)
// @returns Element(Decimal)
// @description
// Returns how far the entity has fallen.
// -->
Expand Down Expand Up @@ -1436,7 +1436,7 @@ else if ((float) getLivingEntity().getHealth() / maxHealth < 1)

// <--[tag]
// @attribute <e@entity.health.max>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the maximum health of the entity.
// -->
Expand All @@ -1446,7 +1446,7 @@ else if ((float) getLivingEntity().getHealth() / maxHealth < 1)

// <--[tag]
// @attribute <e@entity.health.percentage>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the entity's current health as a percentage.
// -->
Expand All @@ -1460,7 +1460,7 @@ else if ((float) getLivingEntity().getHealth() / maxHealth < 1)

// <--[tag]
// @attribute <e@entity.health>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the current health of the entity.
// -->
Expand Down Expand Up @@ -1566,7 +1566,7 @@ else if ((float) getLivingEntity().getHealth() / maxHealth < 1)

// <--[tag]
// @attribute <e@entity.last_damage.amount>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the amount of the last damage taken by the entity.
// -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dList.java
Expand Up @@ -504,7 +504,7 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <fl@flag_name.is_expired>
// @returns Element(boolean)
// @returns Element(Boolean)
// @description
// returns true of the flag is expired or does not exist, false if it
// is not yet expired, or has no expiration.
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/net/aufdemrand/denizen/objects/dLocation.java
Expand Up @@ -534,7 +534,7 @@ else if (dEntity.matches(attribute.getContext(1))) {

// <--[tag]
// @attribute <l@location.pitch>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the pitch of the object at the location.
// -->
Expand Down Expand Up @@ -571,7 +571,7 @@ else if (dEntity.matches(attribute.getContext(1))) {

// <--[tag]
// @attribute <l@location.yaw.raw>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the raw yaw of the object at the location.
// -->
Expand All @@ -582,7 +582,7 @@ else if (dEntity.matches(attribute.getContext(1))) {

// <--[tag]
// @attribute <l@location.yaw>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the normalized yaw of the object at the location.
// -->
Expand Down Expand Up @@ -857,7 +857,7 @@ public int compare(dEntity ent1, dEntity ent2) {

// <--[tag]
// @attribute <l@location.x>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the X coordinate of the location.
// -->
Expand All @@ -867,7 +867,7 @@ public int compare(dEntity ent1, dEntity ent2) {

// <--[tag]
// @attribute <l@location.y>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the Y coordinate of the location.
// -->
Expand All @@ -877,7 +877,7 @@ public int compare(dEntity ent1, dEntity ent2) {

// <--[tag]
// @attribute <l@location.z>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the Z coordinate of the location.
// -->
Expand Down Expand Up @@ -911,7 +911,7 @@ public int compare(dEntity ent1, dEntity ent2) {

// <--[tag]
// @attribute <l@location.distance[<location>]>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the distance between 2 locations.
// -->
Expand All @@ -921,15 +921,15 @@ public int compare(dEntity ent1, dEntity ent2) {

// <--[tag]
// @attribute <l@location.distance[<location>].horizontal>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the horizontal distance between 2 locations.
// -->
if (attribute.getAttribute(2).startsWith("horizontal")) {

// <--[tag]
// @attribute <l@location.distance[<location>].horizontal.multiworld>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the horizontal distance between 2 multiworld locations.
// -->
Expand All @@ -947,15 +947,15 @@ else if (this.getWorld() == toLocation.getWorld())

// <--[tag]
// @attribute <l@location.distance[<location>].vertical>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the vertical distance between 2 locations.
// -->
else if (attribute.getAttribute(2).startsWith("vertical")) {

// <--[tag]
// @attribute <l@location.distance[<location>].vertical.multiworld>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the vertical distance between 2 multiworld locations.
// -->
Expand Down Expand Up @@ -989,7 +989,7 @@ else return new Element(this.distance(toLocation))

// <--[tag]
// @attribute <l@location.biome.humidity>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the current humidity at the location.
// -->
Expand All @@ -999,7 +999,7 @@ else return new Element(this.distance(toLocation))

// <--[tag]
// @attribute <l@location.biome.temperature>
// @returns Element(Number)
// @returns Element(Decimal)
// @description
// Returns the current temperature at the location.
// -->
Expand Down

0 comments on commit 388071e

Please sign in to comment.