Chat

The Chat class simplifies interacting with the Minecraft Chat.

Method Summary

Chat.print(text)

Prints the passed string client-side in the chat.
List of arguments:

  • text, the string to be printed to the chat.

Example:

Chat.print("Axolotl")

Setting

The Setting class allows the creation of module settings. With them, the behavior of a module can be adjusted by the user.

Method Summary

Setting.boolean(options)

Creates a new instance of BoolValue and returns it. It can be either on or off.
The following table describes the properties of the options object.

Property Description Type
name Name under which the setting is displayed. string
default Default value. boolean

Example:

Setting.boolean({
    name: "myBooleanSetting",
    default: true
});

Setting.integer(options)

Creates a new instance of IntegerValue and returns it. Allows the user to select an integer value from a range between the min and max value.
The following table describes the properties of the options object.

Property Description Type
name Name under which the setting is displayed. string
default Default value. number
min Smallest possible value. number
max Largest possible value. number

Example:

Setting.integer({
    name: "myIntegerSetting",
    default: 2,
    min: 1,
    max: 5
});

Setting.float(options)

Creates a new instance of FloatValue and returns it. Allows the user to select a floating-point value from a range between the min and max value.
The following table describes the properties of the options object.

Property Description Type
name Name under which the setting is displayed. string
default Default value. number
min Smallest possible value. number
max Largest possible value. number

Example:

Setting.float({
    name: "myFloatSetting",
    default: 3.5,
    min: 1.0,
    max: 5.0
});

Setting.text(object)

Creates a new instance of TextValue and returns it. Allows the user to specify a string as the value of this setting.
The following table describes the properties of the options object.

Property Description Type
name Name under which the setting is displayed. string
default Default value. string

Example:

Setting.text({
    name: "myTextSetting",
    default: "This is the default value."
});

Setting.block(options)

Creates a new instance of BlockValue and returns it. Allows the user to specify a Minecraft block as the value of this setting.
The following table describes the properties of the options object.

Property Description Type
name Name under which the setting is displayed. string
default Default block ID. number

Example:

Setting.block({
    name: "myBlockSetting",
    default: 12
});

Setting.list(options)

Creates a new instance of ListValue and returns it. Allows the user to select a single value from a list of available values.
The following table describes the properties of the options object.

Property Description Type
name Name under which the setting is displayed. string
default Default value. string
values Array containing all possible values. array

Example:

Setting.list({
    name: "myListSetting",
    default: "Axolotl",
    values: ["Blobfish", "Axolotl", "Stork"]
});

Item

The Item class allows the simple creation of an ItemStack using all necessary information about the desired block.

Method Summary

Item.create(itemData)

Returns an ItemStack that matches the specified NBT data. List of arguments:

  • itemData, string containing all necessary information about the desired block.

Example:

Item.create("name_tag 1 0 {display:{Name: \"Hello!\"}}");