Skip to content

Commit

Permalink
meta fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 29, 2020
1 parent 8094c85 commit 6f1e21f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,14 @@ public String eventArgLowerAt(int index) {
// Modern script events support the concept of 'switches'.
// A switch is a specification of additional requirements in an event line other than what's in the event label it.
//
// A switch consists of a name and a value input, and are can be added anywhere in an event line as "name:<value>"
// For example, "on delta time secondly every:5:" is a valid event, where "delta time secondly" is the event itself,
// and "every:<#>" is a switch available to the event.
// A switch consists of a name and a value input, and are can be added anywhere in an event line as "name:<value>".
// For example, "on delta time secondly every:5:" is a valid event, where "delta time secondly" is the event itself, and "every:<#>" is a switch available to the event.
//
// A traditional Denizen 1 event might look like "on <entity> damaged",
// where "<entity>" can be filled with "entity" or any entity type (like "player").
// A switch-using event would instead take the format "on entity damaged" with switch "type:<entity type>"
// meaning you can do "on entity damaged" for any entity, or "on entity damaged type:player:" for players specifically.
// This is both more efficient to process and more explicit in what's going on, however it is less
// clear/readable to the average user, so it is not often used.
// This is both more efficient to process and more explicit in what's going on, however it is less clear/readable to the average user, so it is not often used.
// Some events may have switches for less-often specified data, and use the event line for other options.
//
// Most switches take input in the form of a simplified name or value.
Expand All @@ -118,9 +116,10 @@ public String eventArgLowerAt(int index) {
// A "<cuboid>" input will expect the name of a notable cuboid, never a fully written out cuboid object.
//
// One of the most common switches across many Denizen events is "in:<area>".
// In these switches, 'area' is a world, notable cuboid, or notable ellipsoid.
// In these switches, 'area' is a world, noted cuboid, or noted ellipsoid.
// So for example you might have an event line like "on player breaks block in:space:"
// where space is the name of a world or of a notable cuboid.
// This also works as "in:cuboid" or "in:ellipsoid" to match for *any* noted cuboid or ellipsoid.
// -->

public boolean checkSwitch(String key, String value) {
Expand Down Expand Up @@ -510,9 +509,9 @@ public String toString() {
// '*_pickaxe|stone' will match any pickaxe or specifically stone. It will NOT match other types of stone, as it interprets
// the match to be a list of "*_pickaxe" and "stone", NOT "*" followed by a list of "pickaxe" or "stone".
//
// Additionally, when you're really deseparate for a good matcher, you may use 'regex:'
// Additionally, when you're really desperate for a good matcher, you may use 'regex:'
// For example, "on player breaks regex:(?i)\d+_customitem:"
// Note that generally regex should be avoided whenever you can, as it's inherently hard to track exactly what it's doing at-a-glance.
// Note that generally regex should be avoided whenever you can, as it's inherently hard to track exactly what it's doing at-a-glance, and may have unexpected edge case errors.
// -->

public static abstract class MatchHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,7 @@ public class ArgumentHelper {
// Many arguments in Denizen require the use of a 'number', or 'decimal'. Sometimes shorthanded to '#' or '#.#',
// this kind of input can generally be filled with any reasonable positive or negative number.
// 'decimal' inputs allow (but don't require) a decimal point in the number.
// 'number' inputs will be rounded, so avoided a decimal point is better. For example, '3.1' will be interpreted as just '3'.
// Numbers can be verified with the 'if' commands' 'matches' functionality.
// For example: "- if <number> matches number" ... will return true if <number> is a valid number.
// -->

// <--[language]
// @name Percentage
// @group Common Terminology
// @description
// Promotes the usage of a 'percentage' format to be used in applicable arguments. The 'percentage' in Denizen is
// much like the 'number', except arguments which utilize percentages instead of numbers can also include a %.
// Percentage arguments can generally be filled with any reasonable positive or negative number with or without a
// decimal point and/or percentage sign. Arguments and other usages will typically refer to a percentage as
// #.#% or <percentage>. Percentages can be verified with the 'if' commands' 'matches' functionality.
// For example: - if <percentage> matches percentage ... will return true if <percentage> is a valid percentage.
//
// Generally it's best to not include the '%' symbol, and some percentage inputs will actually not accept a '%'.
//
// While most things explicitly labeled as being a percentage scale from zero to one hundred (0 - 100)
// others may go from zero to one (0.0 - 1.0).
// To translate between the two formats, you only need to multiply or divide by one hundred (100).
//
// 'number' inputs will be rounded, so avoiding a decimal point is better. For example, '3.1' will be interpreted as just '3'.
// -->

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ default String debuggable() {
// - How you adjust an object (eg change the lore of an item, or teleport an entity).
// For example: you can't teleport the generic concept of a creeper, but you can certainly teleport a specific single creeper in the world.
// - How reliable tags on the object are.
// For example: the result of 'ItemTag.lore' on the item 'i@stick[lore=hi]' will always be 'hi' (because ItemTag are generic),
// For example: the result of 'ItemTag.lore' on the item 'i@stick[lore=hi]' will always be 'hi' (because ItemTags are generic),
// but the result of 'EntityTag.location' on the entity 'e@abc123' will change every tick as the entity moves,
// or even become invalid if the entity dies (because that EntityTag is unique).
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DurationTag implements ObjectTag {
// Many commands and features that require a duration can be satisfied by specifying a number
// and unit of time, especially command arguments that are prefixed 'duration:', etc.
// The unit of time can be specified by using one of the following:
// T=ticks, M=minutes, S=seconds, H=hours, D=days, W=Weeks.
// t=ticks, s=seconds, m=minutes, h=hours, d=days, w=weeks.
// Not using a unit will imply seconds. Examples: 10s, 50m, 1d, 20.
//
// Specifying a range of duration will result in a randomly selected duration that is
Expand Down

0 comments on commit 6f1e21f

Please sign in to comment.