-
Notifications
You must be signed in to change notification settings - Fork 141
Script Methods
This page is only a COPY of the original, dynamically created file on your own server which can be found in ForgeEssentials/Scripting/methods.txt.
checkTimeout <id> [error msg...]
Check, if a timeout finished. Use %s in error message to print the remaining time.
Send confirmation message to the player
Send confirmation message to all players
Send message without any special formatting to the player
Send message without any special formatting to all players
Send error message to the player
Send error message to all players
expAdd <expLevel>
This method will add the specified signed value to the command sender's expLevel.
expCheck <expLevel> [operator -- LT, LTE, GT, GTE, or EQ -- case insensitive]
This method will check the expLevel of a player and compare it to a given value, where LT refers to the player expLevel being less than the inputed value.
If no operator is specified, equals (EQ) will be used as default.
You can also use ==,<,<=,>,>= in place of EQ,LT,LTE,GT,GTE.
expSet <expLevel>
This method will set the command sender's expLevel to the specified value.
Send error message to the player and fail script execution
Send error message to all players and fail script execution
gmCheck <gamemode>
This method will check if the gamemode of the player is equal to the given value.
gmSet <gamemode>
This method will set the command sender's gamemode to the specified value.
healthAdd <health>
This method will add the specified signed value to the command sender's health.
healthCheck <health> [operator -- LT, LTE, GT, GTE, or EQ -- case insensitive]
This method will check the health of a player and compare it to a given value, where LT refers to the player health being less than the inputed value.
If no operator is specified, equals (EQ) will be used as default.
You can also use ==,<,<=,>,>= in place of EQ,LT,LTE,GT,GTE.
healthSet <health>
This method will set the command sender's health to the specified value.
hungerAdd <hunger>
This method will add the specified signed value to the command sender's hunger.
hungerCheck <hunger> [operator -- LT, LTE, GT, GTE, or EQ -- case insensitive]
This method will check the hunger of a player and compare it to a given value, where LT refers to the player hunger being less than the inputed value.
If no operator is specified, equals (EQ) will be used as default.
You can also use ==,<,<=,>,>= in place of EQ,LT,LTE,GT,GTE.
hungerSet <hunger>
This method will set the command sender's hunger to the specified value.
Send notification message to the player
Send notification message to all players
pay <amount> [to-player]
Make the player pay some amount of money and fail, if he can't afford it
permcheck <perm> [value] [error message...]
Permission check (with error message). Use true or false as value for normal permission checks (default value is true).Other values will cause a permission-property check.
permchecksilent <perm> [value] [error message...]
Permission check (without error message). Use true or false as value for normal permission checks (default value is true).Other values will cause a permission-property check.
Modify permissions (like /p command)
random <success-chance-in-percent>
This method will randomly success or fail.
If it fails, the rest of the script will not be executed any more.
saturationAdd <saturation>
This method will add the specified signed value to the command sender's saturation.
saturationCheck <saturation> [operator -- LT, LTE, GT, GTE, or EQ -- case insensitive]
This method will check the saturation of a player and compare it to a given value, where LT refers to the player saturation being less than the inputed value.
If no operator is specified, equals (EQ) will be used as default.
You can also use ==,<,<=,>,>= in place of EQ,LT,LTE,GT,GTE.
saturationSet <saturation>
This method will set the command sender's saturation to the specified value.
startTimeout <id> <t>
Start a timeout
teleport <player> <to-player>
teleport <player> <x> <y> <z> [dim]
timeout <delay> <command...>
Make another command run after a delay (in ms).
Can be used with pattern commands to make more complex timed scripts.
Send warning message to the player
Send warning message to all players