Class Player
java.lang.Object
net.zenoc.gallium.api.world.entity.Entity
net.zenoc.gallium.api.world.entity.Player
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPermission
(String permission) Add a permission to the playervoid
Disconnect the playervoid
disconnect
(ChatMessage reason) Disconnect the playerGet a player by their usernamegetGroup()
Get the player's groupGet the players permissionsGet the player's prefixgetUUID()
Get the player's UUIDboolean
hasPermission
(String permission) Whether the player has a permissionvoid
removePermission
(String permission) Remove a permission from the playervoid
sendMessage
(ChatMessage message) Send a message to the playervoid
setGamemode
(Gamemode gamemode) Set the player'sGamemode
void
Set a player's groupvoid
Set the player's prefixvoid
teleport
(double x, double y, double z) Teleport the playervoid
ungroup()
Ungroup the player
-
Constructor Details
-
Player
public Player(net.minecraft.server.level.ServerPlayer nmsPlayer)
-
-
Method Details
-
getUUID
Get the player's UUID- Returns:
- the uuid
-
hasPermission
Whether the player has a permission- Parameters:
permission
- the permission- Returns:
- whether the player has the permission
-
getPermissions
Get the players permissions- Returns:
ArrayList
of permissions
-
sendMessage
Send a message to the player- Parameters:
message
- aChatMessage
-
disconnect
Disconnect the player- Parameters:
reason
- the reason for disconnecting them
-
disconnect
public void disconnect()Disconnect the player -
fromName
Get a player by their username- Parameters:
username
- the username of the desired player- Returns:
- the
Player
-
getPrefix
Get the player's prefix- Returns:
- the prefix
-
getGroup
Get the player's group- Returns:
- the
Group
-
setGroup
Set a player's group- Parameters:
group
- theGroup
- Throws:
SQLException
-
addPermission
Add a permission to the player- Parameters:
permission
- the permission node- Throws:
SQLException
-
removePermission
Remove a permission from the player- Parameters:
permission
- the permission node- Throws:
SQLException
-
ungroup
Ungroup the player- Throws:
SQLException
-
setPrefix
Set the player's prefix- Parameters:
prefix
- the prefix- Throws:
SQLException
-
teleport
public void teleport(double x, double y, double z) Teleport the player- Parameters:
x
- The X coordinatey
- The Y coordinatez
- The Z coordinate
-
setGamemode
Set the player'sGamemode
- Parameters:
gamemode
- TheGamemode
-