👨MelodyPlayer
MelodyPlayer
Class
MelodyPlayer
ClassThe MelodyPlayer
class is a data class in Kotlin that represents a player in the MelodyMine system. It contains various properties related to the player's state and actions in the system.
Properties
player
Player?
The Bukkit player object.
id
Int
The unique identifier of the player in the system.
uuid
String
The UUID of the player.
name
String
The name of the player.
server
String
The server that the player is currently connected to.
socketID
String?
The ID of the socket connection for the player.
verifyCode
String?
The verification code for the player.
isActiveVoice
Boolean
Indicates whether the player's voice is active.
serverIsOnline
Boolean
Indicates whether the server is online.
webIsOnline
Boolean
Indicates whether the web interface is online.
adminMode
Boolean
Indicates whether the player is in admin mode.
isMute
Boolean
Indicates whether the player is muted.
isToggle
Boolean
Indicates whether the toggle state is on or off.
isSelfMute
Boolean
Indicates whether the player has muted themselves.
isDeafen
Boolean
Indicates whether the player is deafened.
isInCall
Boolean
Indicates whether the player is in a call.
callTarget
MelodyPlayer?
The player that the current player is in a call with.
isCallPending
Boolean
Indicates whether there is a pending call for the player.
callPendingTarget
MelodyPlayer?
The player that the current player has a pending call with.
callToggle
Boolean
Indicates whether the call toggle state is on or off.
isStartCall
Boolean
Indicates whether the player has started a call.
pendingTask
BukkitTask?
The pending task for the player.
isTalk
Boolean
Indicates whether the player is talking.
talkBossBar
TalkBossBar?
The boss bar for the player.
talkNameTag
TalkNameTag?
The name tag for the player.
isSendOffer
ArrayList<String>
The list of offers that the player has sent.
Example Usage
Here is an example of how to use the MelodyPlayer
class in a Java plugin.
In this example, the printPlayerInfo
method retrieves a MelodyPlayer
object from the Storage
class using a UUID, and then prints various properties of the MelodyPlayer
to the console.
Using MelodyManager
to get MelodyPlayer
MelodyManager
to get MelodyPlayer
Here is an example of how to use the getMelodyPlayer
and getMelodyPlayerFromSocketID
methods from MelodyManager
class in a Java plugin.
In this example, the printPlayerInfoFromManager
method retrieves a MelodyPlayer
object from the MelodyManager
class using a UUID and a SocketID, and then prints the ID of the MelodyPlayer
to the console.
Last updated