Skip to content

Commit

Permalink
clean some funky documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 22, 2018
1 parent 56a770b commit 97c435b
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 24 deletions.
Expand Up @@ -128,7 +128,7 @@ else if (args.length() > 2) {
// @description
// The /npc constants command configures a NPC's constants. Uses Denizen's ConstantTrait to keep track of
// NPC-specific constants. This provides seamless integration with an assignment script's 'Default Constants' in
// which string variables can be stored and retrieved with the use of 'replaceable tags', or API. Constants set at
// which text variables can be stored and retrieved with the use of 'replaceable tags', or API. Constants set at
// the NPC level override any constants from the NPC's assignment script.
//
// Constants may be used in several ways: Setting, Removing, and Viewing
Expand Down
Expand Up @@ -355,7 +355,7 @@ public String run(Attribute attribute, dObject object) {

// <--[tag]
// @attribute <ch@chunk.height_map>
// @returns dList(Element)
// @returns dList
// @description
// Returns a list of the height of each block in the chunk.
// -->
Expand Down
Expand Up @@ -1841,7 +1841,7 @@ else if (mtr.angle == BlockFace.EAST) {
// @returns Element(Boolean)
// @group attributes
// @description
// Returns if the entity is currently ablaze or not.
// Returns whether the entity is currently ablaze or not.
// -->
if (attribute.startsWith("on_fire")) {
return new Element(entity.getFireTicks() > 0).getAttribute(attribute.fulfill(1));
Expand Down Expand Up @@ -2149,7 +2149,7 @@ else if (mtr.angle == BlockFace.EAST) {
// @returns Element(Boolean)
// @group attributes
// @description
// Returns if the entity despawns when away from players.
// Returns whether the entity despawns when away from players.
// -->
if (attribute.startsWith("remove_when_far")) {
return new Element(getLivingEntity().getRemoveWhenFarAway())
Expand Down
Expand Up @@ -1580,7 +1580,7 @@ else if (isOnline()) {

// <--[tag]
// @attribute <p@player.sidebar.scores>
// @returns dList(Element(Number))
// @returns dList
// @description
// Returns the current scores set on the player's Sidebar via the Sidebar command,
// in the same order as <@link tag p@player.sidebar.lines>.
Expand Down
Expand Up @@ -310,9 +310,9 @@ public String getAttribute(Attribute attribute) {
// <--[tag]
// @attribute <el@element.last_color>
// @returns Element
// @group string checking
// @group text checking
// @description
// Returns the ChatColors used at the end of a string.
// Returns the ChatColors used last in an element.
// -->
if (attribute.startsWith("last_color")) {
return new Element(ChatColor.getLastColors(element.asString())).getAttribute(attribute.fulfill(1));
Expand All @@ -321,7 +321,7 @@ public String getAttribute(Attribute attribute) {
// <--[tag]
// @attribute <el@element.format[<script>]>
// @returns Element
// @group string manipulation
// @group text manipulation
// @description
// Returns the text re-formatted according to a format script.
// See <@link example using format scripts>.
Expand All @@ -344,7 +344,7 @@ public String getAttribute(Attribute attribute) {
// <--[tag]
// @attribute <el@element.strip_color>
// @returns Element
// @group string manipulation
// @group text manipulation
// @description
// Returns the element with all color encoding stripped.
// -->
Expand All @@ -355,7 +355,7 @@ public String getAttribute(Attribute attribute) {
// <--[tag]
// @attribute <el@element.parse_color[<prefix>]>
// @returns Element
// @group string manipulation
// @group text manipulation
// @description
// Returns the element with all color codes parsed.
// Optionally, specify a character to prefix the color ids. Defaults to '&' if not specified.
Expand Down
Expand Up @@ -50,8 +50,9 @@ public String getAttribute(Attribute attribute) {
// @attribute <i@item.nbt_attributes>
// @returns Element(Boolean)
// @group properties
// @mechanism dItem.nbt_attributes
// @description
// Returns the NBT attribute string, if any.
// Returns the NBT attribute data (as matches the mechanism input), if any.
// -->
if (attribute.startsWith("nbt_attributes")) {
String prop = getPropertyString();
Expand Down
Expand Up @@ -82,7 +82,7 @@ public String getAttribute(Attribute attribute) {
// @group properties
// @mechanism dItem.firework
// @description
// Returns the firework's property string as a list.
// Returns the firework's property value as a list, matching the format of the mechanism.
// -->
// TODO: Easy tags to get individual parts...
if (attribute.startsWith("firework")) {
Expand Down
Expand Up @@ -71,7 +71,7 @@ public String getAttribute(Attribute attribute) {
// @returns Element
// @group properties
// @description
// Returns the value of this item's NBT key as a string Element as best it can.
// Returns the value of this item's NBT key as an Element as best it can.
// -->
if (attribute.matches("nbt")) {
String res = CustomNBT.getCustomNBT(item.getItemStack(), attribute.getContext(1), CustomNBT.KEY_DENIZEN);
Expand Down
Expand Up @@ -681,7 +681,7 @@ public void registerCoreMembers() {
// @Description
// Chat uses an NPCs DenizenSpeechController provided by Denizen, typically inside 'interact' or 'task'
// script-containers. Typically there is already player and NPC context inside a queue that is using
// the 'chat' command. In this case, only a text string is required. Alternatively, target entities
// the 'chat' command. In this case, only a text input is required. Alternatively, target entities
// can be specified to have any Entity chat to a different target/targets, or specify 'no_target' to
// not send the message to any specific target.
//
Expand Down Expand Up @@ -1450,9 +1450,9 @@ public void registerCoreMembers() {
// flicker option means the firework will explode with a flicker effect.
//
// @Tags
// <e@entity.firework_item> returns the firework item which was used to launch the firework.
// <i@item.is_firework> returns if the item is a firework.
// <i@item.firework> Returns the firework's property string as a list.
// <e@entity.firework_item>
// <i@item.is_firework>
// <i@item.firework>
//
// @Usage
// Use to launch a star firework which explodes yellow and fades to white afterwards at the player's location
Expand Down Expand Up @@ -2807,7 +2807,7 @@ public void registerCoreMembers() {
// If a location is specified, it will play the sound for
// all players if they are nearby that location specified.
//
// Optionally, specify 'custom' to play a custom sound added by a resource pack, changing the sound string to something like 'random.click'
// Optionally, specify 'custom' to play a custom sound added by a resource pack, changing the sound name to something like 'random.click'
//
// For a list of all sounds, check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
//
Expand Down
Expand Up @@ -301,7 +301,7 @@ public void schematicTags(ReplaceableTagEvent event) {

// <--[tag]
// @attribute <schematic.list>
// @returns dList(Element)
// @returns dList
// @description
// Returns a list of all loaded schematics.
// -->
Expand Down
Expand Up @@ -264,7 +264,7 @@ public void serverTag(ReplaceableTagEvent event) {

// <--[tag]
// @attribute <server.list_notables[<type>]>
// @returns dList(Notable)
// @returns dList
// @description
// Lists all saved Notables currently on the server.
// Optionally, specify a type to search for.
Expand Down Expand Up @@ -375,7 +375,7 @@ public void serverTag(ReplaceableTagEvent event) {

// <--[tag]
// @attribute <server.get_event_handlers[<event_name>]>
// @returns dList<dScript>
// @returns dList(dScript)
// @description
// Returns a list of all world scripts that will handle a given event name.
// This tag will ignore dObject identifiers (see <@link language dobject>).
Expand Down Expand Up @@ -553,7 +553,7 @@ public void serverTag(ReplaceableTagEvent event) {
// @attribute <server.version>
// @returns Element
// @description
// Returns the version string of the server.
// Returns the version of the server.
// -->
if (attribute.startsWith("version")) {
event.setReplaced(new Element(Bukkit.getServer().getVersion())
Expand Down Expand Up @@ -1118,7 +1118,7 @@ else if (attribute.startsWith("current_bossbars")) {

// <--[tag]
// @attribute <server.recent_tps>
// @returns dList(Element(Decimal))
// @returns dList
// @description
// Returns the 3 most recent ticks per second measurements.
// -->
Expand Down Expand Up @@ -1178,7 +1178,7 @@ public static void adjustServer(Mechanism mechanism) {
// @name run_java
// @input Element
// @description
// Executes an arbitrary Java string. Warning: EXTREMELY DANGEROUS.
// Executes an arbitrary Java method (input as the text of Java code to run). Warning: EXTREMELY DANGEROUS.
// Require config setting 'Commands.Java.Allow Running java'.
// @tags
// None
Expand Down

0 comments on commit 97c435b

Please sign in to comment.