Skip to content
Andrey Vakhterov edited this page Jul 14, 2015 · 4 revisions

Variables

Here are listed all variables that are available to the user ordered by priority

Script variables

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

Script Arguments

  • args
    list of arguments. Used in script files
  • other variables, defined by user when calling the script

Workspace variables

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

Global variables

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

Dynamic properties

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

Clone this wiki locally