JavaScript

Get Ready

Expressions always require a lot of PlaceholderAPI variables in order to fulfill powerful features

So you'd better download the Cloud Expansions you need.

The link below is where you can find the variables

Ⅰ. Action JavaScript

Single line
- 'js: player.sendMessage("&8Hello, there");'
Multiple lines
- |-
js:
player.setVelocity(10);
player.sendTitle("Title", "Subtitle");
Functions Example 1 [ScreenClean]
- |-
js:
function cleanScreen(){
for (var i=0; i<100; i++){
player.sendMessage("");
}
player.sendMessage("&aDone");
}
cleanScreen();
Functions Example 2 [RandomTeleport]
- |-
js:
function randomTeleport() {
var x = TrUtils.randomInteger(0,2500);
var z = TrUtils.randomInteger(0,2500);
var randomLoc = TrUtils.createLocation(player.getWorld(), x, z);
player.teleport(randomLoc);
player.sendTitle("&3&lRandom teleporting...", "&6X: &3" + x + "&8; &6Z: &3" + z, 20, 60, 20);
}
randomTeleport();

TrUtils

This is a class where you can call many methods in JavaScript