Denovo

Values

Read something from the game, or turn one value into another.

join text [text]

join text 0+

Joins several pieces into one text, in order. Press + to add another piece. Numbers and other values are turned into text first.

SlotTakesWhat it is for
1textA piece of the text.

Gives back: text

Script: "text" + value

[Player] has played before

Player has played before

Checks if this player has played on this server before.

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: true/false. True if the player has played before, otherwise false

Script: player.hasPlayedBefore()

Paper javadoc

name of [Player]

name of Player

{@inheritDoc}

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: text

Script: player.getName()

Paper javadoc

location of [Player]

location of Player

Gets the entity's current position

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: Location. a new copy of Location containing the position of this entity

Script: player.getLocation()

Paper javadoc

world of [Player]

world of Player

Gets the current world this entity resides in

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: World. World

Script: player.getWorld()

Paper javadoc

health of [Player]

health of Player

Gets the entity's health from 0 to getMaxHealth(), where 0 is dead.

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: number. Health represented from 0 to max

Script: player.getHealth()

Paper javadoc

food level of [Player]

food level of Player

Gets the players current food level

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: number. Food level

Script: player.getFoodLevel()

Paper javadoc

[Player] is sneaking

Player is sneaking

Returns if the player is in sneak mode

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: true/false. true if player is in sneak mode

Script: player.isSneaking()

Paper javadoc

game mode of [Player]

game mode of Player

Gets this human's current GameMode

SlotTakesWhat it is for
1PlayerThe Player to act on.

Gives back: GameMode. Current game mode

Script: player.getGameMode()

Paper javadoc

[Player] has permission [text]

Player has permission 0

Gets the value of the specified permission, if set. If a permission override is not set on this object, the default value of the permission will be returned.

SlotTakesWhat it is for
1PlayerThe Player to act on.
2textName of the permission

Gives back: true/false. Value of the permission

Script: player.hasPermission(text)

Paper javadoc

[Location] offset by x:[number] y:[number] z:[number]

Location offset by x:0 y:0 z:0

Moves a location by the given amounts along x, y and z, and gives it back. It changes the location it is given as well, so use it on a fresh location, such as location of a player or of a block, rather than on one you want to keep as it is.

SlotTakesWhat it is for
1LocationThe location to move.
2numberHow far to move along x (east is positive).
3numberHow far to move along y (up is positive).
4numberHow far to move along z (south is positive).

Gives back: Location. the same location

Script: location.add(number, number, number)

Paper javadoc

distance from [Location] to [Location]

distance from Location to Location

Get the distance between this location and another. The value of this method is not cached and uses a costly square-root function, so do not repeatedly call this method to get the location's magnitude. NaN will be returned if the inner result of the sqrt() function overflows, which will be caused if the distance is too long.

SlotTakesWhat it is for
1LocationThe Location to act on.
2LocationThe other location

Gives back: number. the distance

Script: location.distance(location)

Paper javadoc

x of [Location]

x of Location

Gets the x-coordinate of this location

SlotTakesWhat it is for
1LocationThe Location to act on.

Gives back: number. x-coordinate

Script: location.getX()

Paper javadoc

y of [Location]

y of Location

Gets the y-coordinate of this location

SlotTakesWhat it is for
1LocationThe Location to act on.

Gives back: number. y-coordinate

Script: location.getY()

Paper javadoc

z of [Location]

z of Location

Gets the z-coordinate of this location

SlotTakesWhat it is for
1LocationThe Location to act on.

Gives back: number. z-coordinate

Script: location.getZ()

Paper javadoc

block at [Location]

block at Location

Gets the block at the represented location

SlotTakesWhat it is for
1LocationThe Location to act on.

Gives back: Block. Block at the represented location

Script: location.getBlock()

Paper javadoc

material of [Block]

material of Block

Gets the type of this block

SlotTakesWhat it is for
1BlockThe Block to act on.

Gives back: Material. block type

Script: block.getType()

Paper javadoc

location of [Block]

location of Block

Gets the Location of the block

SlotTakesWhat it is for
1BlockThe Block to act on.

Gives back: Location. Location of block

Script: block.getLocation()

Paper javadoc

world of [Block]

world of Block

Gets the world which contains this Block

SlotTakesWhat it is for
1BlockThe Block to act on.

Gives back: World. World containing this block

Script: block.getWorld()

Paper javadoc

text of [any value]

text of any value

Turns any value into text, so it can be joined with other text or put in a message. Numbers become their digits; a location, a block or a player becomes a readable description of it.

SlotTakesWhat it is for
1any valueThe value to turn into text.

Gives back: text

Script: value.toString()

Paper javadoc

plain text of [Component]

plain text of Component

Strips the colours and formatting off a chat message and leaves the bare text. Useful on the message an event hands you -- comparing formatted chat against plain text otherwise fails for reasons that are invisible on screen.

SlotTakesWhat it is for
1ComponentThe chat message to flatten, such as the one a chat or join event provides.

Gives back: text

Script: component.plainText()

On this page