The system recognizes 35 explanations!
Search:

Named Arguments (Commands)

Saved Commands (Commands)


Escaping (Escaping)


Script Event Cancellation (Events)

Script Event Priority (Events)

Script Event Requirements (Events)

Script Event Switches (Events)

With Item Switch For Events (Events)


Debug Modes (Script Options)

Executable Script Section (Script Options)


Advancement Scripts (Script Types)

Entity Scripts (Script Types)

In-Game Command Scripts (Script Types)

Item Scripts (Script Types)

Procedure Scripts (Script Types)

Task Scripts (Script Types)

WebPage Scripts (Script Types)

World Scripts (Script Types)

Yaml Data Scripts (Script Types)


The Ex Command (Sponge Commands)


Duration Tags (Tags)

Text Tags (Tags)


AI Goal Types (Useful Lists)

AI Task Types (Useful Lists)

Biome Types (Useful Lists)

Block Types (Useful Lists)

Damage Types (Useful Lists)

Default Game Rules (Useful Lists)

Default Sound Types (Useful Lists)

Default Statistics (Useful Lists)

Entity Types (Useful Lists)

Item Types (Useful Lists)

Particle Types (Useful Lists)

Potion Effect Types (Useful Lists)

Spawn Causes (Useful Lists)
Named Arguments
Commands ExplanationNamed Arguments
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/commands/CommandEntry.java on line 24
Required Addon(s)None
DescriptionMany commands in Denizen2 support NAMED ARGUMENTS.
A named argument is a non-linear argument (IE, an argument that can be put anywhere in the command, orderlessly),
to specify some data that is easier or clearer to write with an explicit name, particular to clarify boolean options.
An example of the syntax is the following:
- do a thing --power 7

In that example, 'do' is the command, 'a' and 'thing' are arguments, and 'power' is a named argument with value '7'.
It's worth noting that the argument name may not contain a tag. It's value, however, can.
Saved Commands
Commands ExplanationSaved Commands
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/commands/CommandEntry.java on line 62
Required Addon(s)None
DescriptionSome commands have to give back data to better fulfill their purpose.
Rather than create a specific tag for this data, we allow commands to save into local definitions.
They will always do this, with default names, and you can see these names and their results in the documentation for any command.
However, it is useful to know that you may rename at least one if not more return values for a command.
You do this via the 'save' named argument.
You give that argument as a value the name of the definition you want to save into.
An example of the syntax is as follows:
- do a thing --save example

In that example, 'do a thing' is the command with arguments, and any data it gives back is saved under the definition 'example'.
To access the data, one would simply type '<[example]>' as per normal definition access!
It is important to note that the data is only available after the command is completed,
and the definition will not be present in prior code, unless defined by a further prior command.
Escaping
Escaping ExplanationEscaping
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/tags/handlers/EscapeTagBase.java on line 10
Required Addon(s)None
DescriptionThere are several text codes ("escape codes") to prevent errors while parsing complicated text.
For example, to properly include a pipe (the | symbol) in a list without it reading as a new list item.
These are those codes:
| = &pipe
< = &lt
> = &gt
newline = &nl
& = &amp
; = &sc
[ = &lb
] = &rb
: = &co
. = &dot
\ = &bs
' = &sq
" = &quo
! = &exc
/ = &fs
ยง = &ss
and finally @ = &at
Also, you can input a non-breaking space via &sp
Script Event Cancellation
Events ExplanationScript Event Cancellation
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/events/ScriptEvent.java on line 192
Required Addon(s)None
DescriptionAny ScriptEvent can take an "ignorecancelled:true" argument.
For example: "on object does something ignorecancelled:true:"
If you set 'ignorecancelled:true', the event will fire regardless of whether it was cancelled.
By default, only non-cancelled events will fire.
Any script event can take the determinations "cancelled" and "cancelled false".
These determinations will set whether the script event is 'cancelled' in the eyes of following script events,
and, in some cases, can be used to stop the event itself from continuing.
A script event can at any time check the cancellation state of an event by accessing "<[context].[cancelled]>".
Script Event Priority
Events ExplanationScript Event Priority
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/events/ScriptEvent.java on line 58
Required Addon(s)None
DescriptionAny ScriptEvent can take a "priority:#" argument.
For example: "on object does something priority:3:"
The priority indicates which order the events will fire in.
Lower numbers fire earlier. EG, -1 fires before 0 fires before 1.
Any integer number, within reason, is valid. (IE, -1 is fine, 100000 is fine,
but 200000000000 is not, and 1.5 is not as well)
The default priority is 0.
Script Event Requirements
Events ExplanationScript Event Requirements
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/events/ScriptEvent.java on line 210
Required Addon(s)None
DescriptionAny ScriptEvent can take requirement arguments.
Those are switches that contain tags that return boolean values.
The script event will not run if any requirement returns false.
An example of the syntax is: "on my object does a thing require:<[context].[object].is_type[BIG]>"
Script Event Switches
Events ExplanationScript Event Switches
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/events/ScriptEvent.java on line 222
Required Addon(s)None
DescriptionAny ScriptEvent can take certain switches, such as the "ignorecancelled" switch, the "require" switch, or custom switches unique to the event.
Switches must all pass for an event script to run. If even one fails (EG a require switch returns false,
or a custom switch has been given incorrect or irrelevant input for that specific firing of the event)
then the event script will not run for that firing.
In many cases, a switch is similar to being a shorthand for an if statement - one that runs very quickly on the internals,
and also that fits in line with the event declaration itself.
An example of the syntax is: "on my object does a thing require:<[context].[object].is_type[BIG]>"
In the example above, "require" is a switch, and the long tag is the switch argument.
With Item Switch For Events
Events ExplanationWith Item Switch For Events
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/events/D2SpongeEventHelper.java on line 164
Required Addon(s)None
DescriptionSome events contain an "with_item:" switch.
This is a special-case-switch with sub-options!
For example, you would write "with_item:type:stick" to check if the item is of TYPE stick!
Note that this syntax additionally allows for multiple options, as well as sub-lists for specific potential options.
"with_item:type:stick&pipestone|quantity:5|flagged:best_stick_or_stone"
Options:
type: (ItemTypeTag) checks if the item type matches.
Quantity: (IntegerTag) checks if the quantity is at least a value.
Flagged: (TextTag) checks if the item has a flag.
Script: (ScriptTag) checks if the item was created by a specific script.
Debug Modes
Script Options ExplanationDebug Modes
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/scripts/CommandScript.java on line 32
Required Addon(s)None
DescriptionThere are three different debug modes any script can have.
FULL: (Best while working on a script!) All debug output is shown.
MINIMAL: (Recommended (when not still testing)!) only errors are shown.
NONE: (Only for very special cases!) Nothing at all is shown.
You can set these in any script container like this example
# Any script name is valid here
my_script:
  # Any type is valid here
  type: task
  # Note the "debug: " option, which can be any of the three options specified above.
  debug: minimal
  # ... contents of the script code here ...

TODO: Explain better
Executable Script Section
Script Options ExplanationExecutable Script Section
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/scripts/CommandScript.java on line 105
Required Addon(s)None
DescriptionAn executable script section is any part of a script that contains valid Denizen code.
This is not determined by the validity of code, but rather by the section title.
For the most part, any YAML list is going to be assumed to be an executable script section, and thus be compiled.
The exception is keys that start with the word "constant".
So if you wish to include non-executable data in your script (EG a constant value for reference),
you would generally put all data under the key "constants" or anything else that starts with "constant".
If you have a lot of constant data, consider putting it in a 'yaml data' typed script instead.
TODO: Link YAML Data script container info.
This script type has the special case of /all/ it's data being non-executable, meaning it can be used freely
for constant data.
TODO: Explain better
Advancement Scripts
Script Types ExplanationAdvancement Scripts
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/spongescripts/AdvancementScript.java on line 35
Required Addon(s)None
DescriptionAn advancement script is a script that adds new advancements to the server.
It is identified with the type "advancement".
Expected keys: id (TextTag), name (TextTag, optional), display (challenge/goal/task),
title (FormattedTextTag), description (FormattedTextTag), announce (BooleanTag),
show_toast (BooleanTag), hidden (BooleanTag), icon (ItemTypeTag),
parent (TextTag, only for children advancements), tree_id (TextTag, only for root
advancements), tree_name (TextTag, only for root advancements, optional),
position_x (NumberTag), and position_y (NumberTag).
TODO: Add "Related information" such as advancement types and examples.
Entity Scripts
Script Types ExplanationEntity Scripts
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/spongescripts/EntityScript.java on line 36
Required Addon(s)None
DescriptionAn entity script is a type of script that fully defines specific entity template, which can
be used to spawn entities afterwards. Keys in an entity script define which properties the
final entity will have.
An entity script can be used in place of an entity type in certain spawning related commands or inputs.
The entity script name may not be the same as an existing entity type name.
Entities generated from an entity script will remember their type using flag "_d2_script".
To stop this from occurring, set key "plain" to "true".
Set key "static" to "true" on the entity script to make it load once at startup and simply be duplicated on
all usages. If static is false or unspecified, the entity script will be loaded from data at each call
requesting it. This is likely preferred if any tags are used within the script.
All options listed below are used to define the entity's specific details.
They all support tags on input. All options other than "base" may use the automatically
included definition tag <[base]> to get the base type.
Set key "base" directly to an EntityTypeTag of the basic entity type to use. You may also
use an existing entity script to inherit its properties. Be careful to not list the
entity script within itself, even indirectly, as this can cause recursion errors.
Set key "display name" directly to a TextTag or FormattedTextTag value of the name the entity should have.
Set key "flags" as a section and within it put all flags keyed by name and with the value that each flag should hold.
If you wish to dynamically structure the mapping, see the "keys" option for specifying that.
To specify other values, create a section labeled "keys" and within it put any valid entity keys.
TODO: Create and reference an explanation of basic entity keys.
Set key "ai tasks" to specify AI Tasks that will be applied to the entity on spawn. Valid task types can be found in the
<@link explanation AI Task Types>AI task types explanation<@/link>, and the properties they accept
are explained in the <@link command addaitask>addaitask command<@/link> documentation.
On top of that, each task accepts a goal (see <@link explanation AI Goal Types>AI goal types<@/link>) and a priority value.
In-Game Command Scripts
Script Types ExplanationIn-Game Command Scripts
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/spongescripts/GameCommandScript.java on line 48
Required Addon(s)None
DescriptionAn in-game command script is a script that handles in-game commands.
It is simply identified with the type "command".
Expected keys: name (ListTag/TextTag), description (TextTag), permission (TextTag, optional),
script (commands). Valid contexts: source (player/block/minecart/server),
player (PlayerTag, if source=player), location (LocationTag, if source=block),
entity (EntityTag, if source=minecart), arguments (ListTag), raw_arguments (TextTag).
Item Scripts
Script Types ExplanationItem Scripts
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/spongescripts/ItemScript.java on line 37
Required Addon(s)None
DescriptionAn item script is a type of script that fully defines a specific in-game item stack.
Keys in an item script define the various properties of an item stack.
An item script can be used in place of any normal item, by putting the name of the item script
where a script expects an item type. A script may block this from user input by
requiring a valid ItemTypeTag input, which will not recognize an item script.
The item script name may not be the same as an existing item type name.
ItemStacks generated from an item script will remember their type using flag "_d2_script".
To stop this from occurring, set key "plain" to "true".
Set key "static" to "true" on the item script to make it load once at startup and simply be duplicated on all usages.
If static is false or unspecified, the item script will be loaded from data at each call requesting it.
This is likely preferred if any tags are used within the script.
Quantity values should be specified in the script requesting the item (For example, in a give command)
as that is likely very localized. The item stack given directly by the item script system will have a quantity of 1.
All options listed below are used to define the item's specific details. They all support tags on input.
All options other than "material" may use the automatically included definition tag <[material]> to get the base material.
Set key "material" directly to an ItemTag of the basic item type to use. You may list an item type, or an existing item.
Be careful to not list the item script within itself, even indirectly, as this can cause recursion errors.
Set key "display name" directly to a TextTag or FormattedTextTag value of the name the item should have.
Set key "lore" as a list key of lines the item should have.
If you wish to dynamically structure the list, see the "other values" option for specifying that.
Set key "flags" as a section and within it put all flags keyed by name and with the value that each flag should hold.
If you wish to dynamically structure the mapping, see the "keys" option for specifying that.
To specify other values, create a section labeled "keys" and within it put any valid item keys.
TODO: Create and reference an explanation of basic item keys.
Procedure Scripts
Script Types ExplanationProcedure Scripts
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/scripts/commontypes/ProcedureScript.java on line 10
Required Addon(s)None
DescriptionA procedure script is the most basic procedural script in Denizen.
It runs its code (usually the "script" section) when told to run it by the
<@link tag procedure>procedure<@/link> tag.
A procedural script can only calculate things, it cannot execute changes upon the world.
Task Scripts
Script Types ExplanationTask Scripts
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/scripts/commontypes/TaskScript.java on line 10
Required Addon(s)None
DescriptionA task script is the most basic executable script in Denizen.
It runs its code (usually the "script" section) when told to run it by the
<@link command run>run<@/link> or <@link command inject>inject<@/link> commands.
WebPage Scripts
Script Types ExplanationWebPage Scripts
SourceWebizen2 at: Webizen2-master/src/main/java/com/denizenscript/webizen2/scripts/webtypes/WebPageScript.java on line 12
Required Addon(s)Webizen2
DescriptionA webpage script can be used to represent a page in Webizen2.
Page data is under the 'page' key, with tags marked as `<{tag}>` rather than `<tag>`.
TODO: More detail!
World Scripts
Script Types ExplanationWorld Scripts
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/scripts/commontypes/WorldScript.java on line 13
Required Addon(s)None
DescriptionA world script is one of the core executable script types in Denizen.
It runs its code beneath the "events" section when told to run it by a script event firing.
TODO: Link event system explanation!
Yaml Data Scripts
Script Types ExplanationYaml Data Scripts
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/scripts/commontypes/YamlDataScript.java on line 9
Required Addon(s)None
DescriptionA Yaml Data script contains data and does not execute it. For use with:
<@link tag ScriptTag.yaml_key>script.yaml_key[...]<@/link>.
The Ex Command
Sponge Commands ExplanationThe Ex Command
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/spongecommands/ExCommand.java on line 30
Required Addon(s)None
DescriptionThe /ex command lets you execute any code directly from the console or in-game chat!
A regular example is: /ex echo 'hello world!'
By default, it will feed back all output to you if you are in-game.
To disable this do, run: /ex -q <command>
specifically with the -q flag.
To run multiple commands, simply separate them with dashes. EG: /ex command - command - command
You can use definitions: source (returns TextTag of player, block, minecart, or server),
player (for source==player), location (for source==block), or entity (for source==minecart).
This can be used for such quick helpers as: /ex reload
TODO: Explain better
Duration Tags
Tags ExplanationDuration Tags
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/tags/objects/DurationTag.java on line 14
Required Addon(s)None
DescriptionDuration tags are a representation of a duration of time.
They can be specified in terms of seconds, minutes, hours, or days.
For example "1s" is one second, "1m" is one minute, "1h" is one hour, and "1d" is one day.
Text Tags
Tags ExplanationText Tags
SourceDenizen2Core at: Denizen2Core-master/src/main/java/com/denizenscript/denizen2core/tags/handlers/TextTagBase.java on line 10
Required Addon(s)None
DescriptionTextTags are any random text, built into the tag system.
TODO: Explain better
TODO: Link tag system explanation
AI Goal Types
Useful Lists ExplanationAI Goal Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/entity/AddAITaskCommand.java on line 16
Required Addon(s)None
DescriptionA list of all default AI goal types can be found here:
<@link url https://jd.spongepowered.org/7.1.0-SNAPSHOT/org/spongepowered/api/entity/ai/GoalTypes.html>AI goal types list<@/link>
These can be used with the <@link command addaitask>addaitask<@/link> and <@link command removeaitasks>removeaitasks<@/link> commands.
Keep in mind that the goal type "normal" is available for most living entities,
while the "target" goal type is mainly for combat related ones.
AI Task Types
Useful Lists ExplanationAI Task Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/entity/AddAITaskCommand.java on line 28
Required Addon(s)None
DescriptionThe default AI task types are "attack_living", "avoid_entity", "find_target",
"look_idle", "range", "run_around", "swim", "wander", and "watch_closest".
These can be used with the <@link command addaitask>addaitask<@/link> and <@link command removeaitasks>removeaitasks<@/link> commands.
Biome Types
Useful Lists ExplanationBiome Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/tags/objects/LocationTag.java on line 46
Required Addon(s)None
DescriptionA list of all default biome types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/world/biome/BiomeTypes.html>biome types list<@/link>
Block Types
Useful Lists ExplanationBlock Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/tags/objects/BlockTypeTag.java on line 24
Required Addon(s)None
DescriptionA list of all default block types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/block/BlockTypes.html>block types list<@/link>
These can be used with the setblock command as well as with some event switches.
Damage Types
Useful Lists ExplanationDamage Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/entity/HurtCommand.java on line 20
Required Addon(s)None
DescriptionA list of all default damage types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/event/cause/entity/damage/DamageTypes.html>damage types list<@/link>
These can be used with the hurt command.
Default Game Rules
Useful Lists ExplanationDefault Game Rules
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/world/SetGameRuleCommand.java on line 19
Required Addon(s)None
DescriptionA list of all default game rules can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/world/gamerule/DefaultGameRules.html>default game rule list<@/link>
These can be used with the setgamerule command. Note: these Sponge game rule
ids are used by Denizen2, but they don't match the Minecraft ones. For example,
'keepInventory' in Minecraft becomes 'keep_inventory' in Sponge/Denizen2.
Default Sound Types
Useful Lists ExplanationDefault Sound Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/world/PlaySoundCommand.java on line 17
Required Addon(s)None
DescriptionA list of all default sound types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/effect/sound/SoundTypes.html>default sound types list<@/link>
These can be used with the playsound command, if you replace '_' with '.'.
For example, 'entity.arrow.hit' is a valid default sound type.
Default Statistics
Useful Lists ExplanationDefault Statistics
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/tags/objects/PlayerTag.java on line 41
Required Addon(s)None
DescriptionA list of all default general statistics can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/statistic/Statistics.html>default general statistic list<@/link>
These can be used alone in the statistic tag for player objects.
A list of all default statistic types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/statistic/StatisticTypes.html>default statistic type list <@/link>
These can be used with a modifier in the statistic tag.
Entity Types
Useful Lists ExplanationEntity Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/tags/objects/EntityTypeTag.java on line 24
Required Addon(s)None
DescriptionA list of all default entity types can be found here:
<@link url https://jd.spongepowered.org/7.1.0-SNAPSHOT/org/spongepowered/api/entity/EntityTypes.html>entity types list<@/link>
These can be used with the spawn command as well as with some event switches.
Item Types
Useful Lists ExplanationItem Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/items/GiveCommand.java on line 17
Required Addon(s)None
DescriptionA list of all default item types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/item/ItemTypes.html>item types list<@/link>
These can be used with the give and equip commands.
Particle Types
Useful Lists ExplanationParticle Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/world/PlayEffectCommand.java on line 15
Required Addon(s)None
DescriptionA list of all default particle types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/effect/particle/ParticleTypes.html>particle types list<@/link>
These can be used with the playeffect command.
Potion Effect Types
Useful Lists ExplanationPotion Effect Types
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/commands/entity/CastCommand.java on line 20
Required Addon(s)None
DescriptionA list of all default potion effect types can be found here:
<@link url https://jd.spongepowered.org/7.0.0-SNAPSHOT/org/spongepowered/api/effect/potion/PotionEffectTypes.html>potion effect types list<@/link>
These can be used with the cast command.
Spawn Causes
Useful Lists ExplanationSpawn Causes
SourceDenizen2Sponge at: Denizen2Sponge-master/src/main/java/com/denizenscript/denizen2sponge/events/entity/EntitySpawnsScriptEvent.java on line 52
Required Addon(s)None
DescriptionA list of all default spawn causes can be found here:
<@link url https://jd.spongepowered.org/7.1.0-SNAPSHOT/org/spongepowered/api/event/cause/entity/spawn/SpawnTypes.html>spawn types list<@/link>
This information can be useful to understand the cause context in spawn events,
and cause named argument in spawn commands.