Skip to content
Flint
Documentation

player

typePaperVelocity

An online player.

Also has everything from offline_player, sender, entity, living.

Properties 26

Display name.

Food level, 0 to 20.

Experience level.

survival, creative, adventure or spectator.

Whether the player is flying.

Whether the player may fly.

Whether the player is sneaking.

player.op: bool
read-onlyPaper

Whether the player is a server operator.

Latency in milliseconds.

IP address.

Client language, such as en_us.

False once the player has left.

Hidden food reserve that is used up before the food bar.

Walking speed; 0.2 is normal, 1 is the maximum.

Flying speed; 0.1 is normal, 1 is the maximum.

All experience points the player has collected.

player.brand: text
read-onlyPaper

Client the player uses (vanilla, fabric...), if it said so.

Where the player respawns (bed or anchor), or none.

Where the player's compass points.

player.exp: number
settablePaper

Progress to the next level, 0 to 1.

Name shown in the player list.

The player's inventory.

Item in the main hand (none if empty).

player.name: text
read-onlyVelocity

Username.

player.uuid: text
read-onlyVelocity

Unique id.

player.server: server
read-onlyVelocity

The backend server the player is on, or none.

Methods 17

Kicks the player.

Gives an item (an item value or a type name such as "diamond").

Shows a message above the hotbar.

Plays a sound, e.g. "entity.player.levelup".

Makes the player run a command (without the slash).

Opens an inventory or a menu for the player.

Closes whatever inventory the player has open.

Gives a potion effect, e.g. player.effect("speed", 30 seconds, 2).

True if the player has that potion effect.

Removes one potion effect, or all of them.

Removes the title from the player's screen.

Makes this player invisible to another player (vanish).

Makes this player visible to another player again.

True if this player can see the other player.

Greys out an item type in the hotbar for a while, like ender pearls.

Sends the player to a backend server (a server or its name).

Also has everything from offline_player

Also has everything from sender

Also has everything from entity

Also has everything from living