Skip to content
Flint
Dokumentation

player

typePaperVelocity

An online player.

Har også alt fra offline_player, sender, entity, living.

Egenskaber 26

Display name.

player.food: number
kan ændresPaper

Food level, 0 to 20.

player.level: number
kan ændresPaper

Experience level.

player.gamemode: text
kan ændresPaper

survival, creative, adventure or spectator.

player.flying: bool
kan ændresPaper

Whether the player is flying.

player.can_fly: bool
kan ændresPaper

Whether the player may fly.

player.sneaking: bool
skrivebeskyttetPaper

Whether the player is sneaking.

player.op: bool
skrivebeskyttetPaper

Whether the player is a server operator.

player.ping: number
skrivebeskyttet

Latency in milliseconds.

player.ip: text
skrivebeskyttet

IP address.

player.locale: text
skrivebeskyttet

Client language, such as en_us.

player.online: bool
skrivebeskyttet

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
skrivebeskyttetPaper

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
kan ændresPaper

Progress to the next level, 0 to 1.

player.tab_name: text
kan ændresPaper

Name shown in the player list.

player.inventory: inventory
skrivebeskyttetPaper

The player's inventory.

player.held_item: item
kan ændresPaper

Item in the main hand (none if empty).

player.name: text
skrivebeskyttetVelocity

Username.

player.uuid: text
skrivebeskyttetVelocity

Unique id.

player.server: server
skrivebeskyttetVelocity

The backend server the player is on, or none.

Metoder 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).

Har også alt fra offline_player

Har også alt fra sender

Har også alt fra entity

Har også alt fra living