Basic commands


Invoke

  • Name: invoke

  • Syntax: invoke [<java_expression>]

  • Description: Executes a Java string expression. Supports methods, fields, private members, and constructors.

  • Tags:

    • <invoke[<java_expression>]>: The result of the expression.

  • Usage:

  # Use to change player health.
  - invoke player.setHealth(0)

  # Use to get definition.
  - define health 0
  - invoke player.setHealth(health)

  # Use to get context — example: <context.damager>.
  - invoke damager.setHealth(0)
  
  # Use to get player name.
  - define name <invoke[player.getName()]>

Async-While

  • Name: async-while

  • Syntax: async-while [stop/next/[<value>] (!)(<operator> <value>) (&&/|| ...)] [<commands>]

  • Description: Runs a series of braced commands asynchronously until the comparisons return false. Unlike the normal while command, this does not block the current queue.

  • Tags:

    • <[loop_index]>: Gets the number of loops so far.

  • Usage:


Command

  • Name: command

  • Syntax: command [create/delete/rename] [<command_name>] [with:<value>]

  • Description: Creates, deletes, or renames Denizen commands at runtime.

  • Argument Map Structure: - type: linear (default) | prefixed | boolean - name: (required) Variable name. - tooltip: (optional) Syntax display. - default: (optional) Default value.

  • Usage:


Event

  • Name: event

  • Syntax: event [rename] [<event_name>] [to:<new_event_name>]

  • Description: Renames Denizen events at runtime.

  • Usage:


Tag

  • Name: tag

  • Syntax: tag [create/delete] [<tag_name>] (static) (in:<object_name>)

  • Description: Tag manager. Creates or deletes a custom tag.

  • Usage:


Placeholder

  • Name: placeholder

  • Syntax: placeholder [create/delete] [<placeholder>] [author:<author>] [version:<version>]

  • Description: Allows you to create placeholders.

  • Usage:


Proxy

  • Name: proxy

  • Syntax: proxy [<interfaces>|...] (using:<map>) (as:<name>)

  • Description: Creates a proxy object using the specified interfaces.

  • Usage:


Section

  • Name: section

  • Syntax: section (<definitions>) (as:<name>)

  • Description: Creates a Section object containing a list of commands. This object can be passed around, executed, or used as a handler in a proxy command.

  • Usage:

Last updated