Interface ChatPluginPlayer
- All Known Implementing Classes:
ChatPluginProxyPlayer
,ChatPluginServerPlayer
public interface ChatPluginPlayer
Represents a player handled by the
PlayerManager
loaded into the ChatPlugin system.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Connects this player to the specified server.void
disconnect
(String reason) Disconnects this player with the specified reason.Gets this player's IP address.getName()
Gets this player's name.getUUID()
Gets this player's UUID.Gets this player's version.boolean
Checks if this player is connected throughIntegrationType.GEYSERMC
.void
sendMessage
(String message) Sends a plain message to this player.
-
Method Details
-
getName
String getName()Gets this player's name.- Returns:
- Player's name
-
getUUID
UUID getUUID()Gets this player's UUID.- Returns:
- Player's UUID
-
getIPAddress
InetAddress getIPAddress()Gets this player's IP address.Note: BungeeCord supports connections via Unix domain sockets. If this method is called on a player connected through a Unix domain socket,
InetAddress.getLoopbackAddress()
is returned.- Returns:
- Player's IP address
-
getVersion
VersionUtils.Version getVersion()Gets this player's version.- Returns:
- Player's version
-
isBedrockPlayer
boolean isBedrockPlayer()Checks if this player is connected throughIntegrationType.GEYSERMC
.- Returns:
- Whether this player is using the Bedrock Edition
-
sendMessage
Sends a plain message to this player.- Parameters:
message
- Message to send
-
connect
Connects this player to the specified server.Will do nothing if called on a server with a single instance setup.
- Parameters:
server
- Server to connect the player to- Throws:
UnsupportedOperationException
- If!
ChatPlugin.isPremium()
-
disconnect
Disconnects this player with the specified reason.On server (Bukkit/Sponge) implementations, the player will be kicked immediately if this method is called by the main thread, otherwise it will be executed on the next tick.
- Parameters:
reason
- Reason to kick the player for
-