-
Notifications
You must be signed in to change notification settings - Fork 0
variables
Andrey Vakhterov edited this page Jul 14, 2015
·
4 revisions
Here are listed all variables that are available to the user ordered by priority
These variables are available for any execution of the script:
-
me
a player, entity, block or console, who called the script. All autorun files executed by console -
server
minecraft server -
workspace
workspace used in this script -
global
the global object (workspace service) that contains all workspaces and global variables -
_
last execution result -
caller
current caller object
-
args
list of arguments. Used in script files - other variables, defined by user when calling the script
All variables created by player are stored in a workspace
Example:
/> foo = "bar"
/> println foo // prints "bar"
These variables available for workspace users only.
See also: Workspace API
The global contains all variables defined as property by players or script files.
This variables available in all workspaces and scripts.
Example:
/> global.foo = "bar"
/> println foo // prints "bar" wherever it was called
See also: Workspace API
The value of these variables is changed depending on who and where uses them
-
block
block on which you look -
here
your location -
entities
list of all entities in all worlds -
players
list of online players -
items
list of dropped items -
worlds
list of loaded worlds - script name
call script file and return result as value of variable - player name
get player by name - plugin name
get plugin by name - world name
get world by name