Skip to content

Chat Functions

wagyourtail edited this page Aug 12, 2020 · 12 revisions

the chat functions are:

log(TextHelper) 1.1.3

Example: chat.log(text);

sends the raw of TextHelper to the in game chat.

log(Object) 1.1.3+

  • before 1.1.3 was log(String) and didn't automatically do type-coersion.

Example: chat.log(1);

This logs a string to the client chat in game. using .toString() on the input.

say(String)

Example: chat.say("Hello World!");

This sends a string to the server chat so everyone can see it, or so you can send a command.

createTextHelperFromString(String)

Example: chat.creatTextHelperFromString("Hello, World!");

returns a text helper from a provided string.

createTextHelperFromJSON(String)

Example: chat.createTextHelperFromJSON(json);

returns a text helper from provided json. look at an existing recv_message text helper for some reference.

title(Object, Object, Int, Int, Int) 1.2.1+

Example: chat.title("Test", textHelper, fadeInTicks, remainTicks, fadeOutTicks);

display a large title in the middle of the screen.

actionbar(Object, boolean) 1.2.1+

Example: chat.actionbar(text, tinted)

displays a small title above the hotbar (like the item names)

toast(Object, Object) 1.2.5+

Example: chat.toast(title, description)

display a toast (the message in the top right).

Clone this wiki locally