Meigo™ CorporationMeigo™ Corporation

Importing classes


The import system allows you to define Java class imports at the top of your script files. This enables the use of short class names within invoke commands and Java expressions.

Syntax

Add an import: block at the root of your .dsc file.

import:
  <full.class.name>
  <full.class.name> as <alias>

Usage

import:
  java.util.ArrayList
  org.bukkit.Bukkit as Server
  java.lang.System

MyTask:
  type: task
  script:
  - define ArrayList <invoke[new ArrayList()]>
  - invoke Server.getVersion()
  - invoke System.out.println("test")

On this page