Files

1.9 KiB

IScriptFactory.vector4

← IScriptFactory · ← Master

Parça 8/11 · önceki · sonraki

simple - Whether you want to see simple or full information about the object.

random

double random(double max)

Generate a random number between 0 and the given max value (but not including the maximum value).

var randomNumber = mappet.random(10);

c.send(randomNumber);

Parameters: max - Maximum value.

random

double random(double min, double max)

Generate a random number between the given min value and the given max value (but not including the maximum value).

var randomNumber = mappet.random(5, 10);

c.send(randomNumber);

Parameters: min - Minimum value. max - Maximum value.

random

double random(double min, double max, long seed)

Generate a random number between the given min value and the given max value (but not including the maximum value) with given seed.

var randomNumber = mappet.random(5, 10, 4141241);

c.send(randomNumber);

Parameters: min - Minimum value. max - Maximum value.

style

java.lang.String style(java.lang.String... codes)

Return Minecraft's formatting code.

Following colors are supported: black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white

Following styles are supported: obfuscated, bold, strikethrough, underline, italic, reset.

var style = mappet.style("dark_blue", "bold", "underline");

c.send(style + "This text is in blue!");

Parameters: codes - An enumeration of formatting codes.

getLogger

IMappetLogger getLogger()

Return a mappet logger instance.

getMappetEntity

IScriptEntity getMappetEntity(Entity minecraftEntity)

Return a mappet entity/player/npc by given minecraft entity.

function main(c) {