Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 183 commands...
NameExperience
Syntaxexperience [set/give/take] (level) [<#>]
Short DescriptionGives or takes experience points to the player.
Full DescriptionThis command allows modification of a players experience points.

Experience can be modified in terms of XP points, or by levels.

This command works with offline players, but using it on online players is safer.
Related Tags<PlayerTag.xp> Returns the percentage of experience points to the next level.
<PlayerTag.xp_to_next_level> Returns the amount of XP the player needs to get to the next level. (...)
<PlayerTag.xp_total> Returns the total amount of experience points the player has. (...)
<PlayerTag.xp_level> Returns the number of XP levels the player has. (...)
Usage Example
#Use to set a player's total experience to 0.
- experience set 0
Usage Example
#Use to give a player 1 level.
- experience give level 1
Usage Example
#Use to take 1 level from a player.
- experience take level 1
Usage Example
#Use to give a player with the name steve 10 experience points.
- experience give 10 player:<[someplayer]>
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ExperienceCommand.java#L22