Class OnlinePAFPlayerMySQL
java.lang.Object
de.simonsator.partyandfriends.api.pafplayers.PAFPlayerClass
de.simonsator.partyandfriends.pafplayers.mysql.PAFPlayerMySQL
de.simonsator.partyandfriends.pafplayers.mysql.OnlinePAFPlayerMySQL
- All Implemented Interfaces:
IDBasedPAFPlayer
,OnlinePAFPlayer
,PAFPlayer
-
Field Summary
Fields inherited from class de.simonsator.partyandfriends.pafplayers.mysql.PAFPlayerMySQL
id
-
Constructor Summary
ConstructorDescriptionOnlinePAFPlayerMySQL
(int pID, net.md_5.bungee.api.connection.ProxiedPlayer pPlayer) -
Method Summary
Modifier and TypeMethodDescriptionint
changeSettingsWorth
(int pSettingsID) void
connect
(net.md_5.bungee.api.config.ServerInfo pInfo) void
getName()
net.md_5.bungee.api.connection.ProxiedPlayer
net.md_5.bungee.api.config.ServerInfo
boolean
isOnline()
void
sendMessage
(net.md_5.bungee.api.chat.TextComponent pTextComponent) Sends a message to the player if he is onlinevoid
sendPacket
(net.md_5.bungee.api.chat.TextComponent chat) void
sendPacket
(net.md_5.bungee.protocol.packet.Chat chat) Please usePAFPlayer.sendPacket(TextComponent)
insteadboolean
teleportTo
(OnlinePAFPlayer pPlayer) void
update()
Methods inherited from class de.simonsator.partyandfriends.pafplayers.mysql.PAFPlayerMySQL
addFriend, addFriendNoMultiCoreEnhancement, deleteAccount, denyRequest, denyRequestNoMultiCoreEnhancement, doesExist, getFriendRequestCount, getFriends, getLastOnline, getLastPlayerWroteTo, getPAFPlayer, getPlayerID, getRequests, getSettingsWorth, hasPermission, hasRequestFrom, isAFriendOf, removeFriend, removeFriendNoMultiCoreEnhancement, sendFriendRequest, sendFriendRequestNoMultiCoreEnhancement, setLastPlayerWroteFrom, setMultiCoreEnhancement, setSetting, toString, updateLastOnline
Methods inherited from class de.simonsator.partyandfriends.api.pafplayers.PAFPlayerClass
equals, getDisplayNameProvider, getServerConnector, hashCode, sendMessage, sendMessage, sendMessage, setDisplayNameProvider, setServerConnector
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.simonsator.partyandfriends.api.pafplayers.OnlinePAFPlayer
getParty
Methods inherited from interface de.simonsator.partyandfriends.api.pafplayers.PAFPlayer
addFriend, deleteAccount, denyRequest, doesExist, getFriendRequestCount, getFriends, getLastOnline, getLastPlayerWroteTo, getPAFPlayer, getRequests, getSettingsWorth, hasPermission, hasRequestFrom, isAFriendOf, removeFriend, sendFriendRequest, sendMessage, sendMessage, sendMessage, setLastPlayerWroteFrom, setSetting, updateLastOnline
-
Constructor Details
-
OnlinePAFPlayerMySQL
public OnlinePAFPlayerMySQL(int pID, net.md_5.bungee.api.connection.ProxiedPlayer pPlayer)
-
-
Method Details
-
createEntry
public void createEntry()- Specified by:
createEntry
in interfaceOnlinePAFPlayer
-
getName
- Specified by:
getName
in interfacePAFPlayer
- Overrides:
getName
in classPAFPlayerMySQL
-
getUniqueId
- Specified by:
getUniqueId
in interfacePAFPlayer
- Overrides:
getUniqueId
in classPAFPlayerMySQL
-
connect
public void connect(net.md_5.bungee.api.config.ServerInfo pInfo) - Specified by:
connect
in interfaceOnlinePAFPlayer
-
sendMessage
public void sendMessage(net.md_5.bungee.api.chat.TextComponent pTextComponent) Description copied from interface:PAFPlayer
Sends a message to the player if he is online- Specified by:
sendMessage
in interfacePAFPlayer
- Overrides:
sendMessage
in classPAFPlayerClass
- Parameters:
pTextComponent
- The message
-
teleportTo
- Specified by:
teleportTo
in interfaceOnlinePAFPlayer
-
getServer
public net.md_5.bungee.api.config.ServerInfo getServer()- Specified by:
getServer
in interfaceOnlinePAFPlayer
-
isOnline
public boolean isOnline()- Specified by:
isOnline
in interfaceOnlinePAFPlayer
- Specified by:
isOnline
in interfacePAFPlayer
- Overrides:
isOnline
in classPAFPlayerClass
- Returns:
- Returns true if the player is online. If the player is online it is safe to cast an object of this class
to an
OnlinePAFPlayer
-
getPlayer
public net.md_5.bungee.api.connection.ProxiedPlayer getPlayer()- Specified by:
getPlayer
in interfaceOnlinePAFPlayer
- Returns:
- Returns the player if he is on this Bungeecord. If he is on another Bungeecord (RedisBungee) it returns null.
-
changeSettingsWorth
public int changeSettingsWorth(int pSettingsID) - Specified by:
changeSettingsWorth
in interfaceOnlinePAFPlayer
-
sendPacket
public void sendPacket(net.md_5.bungee.protocol.packet.Chat chat) Description copied from interface:PAFPlayer
Please usePAFPlayer.sendPacket(TextComponent)
instead- Specified by:
sendPacket
in interfaceOnlinePAFPlayer
- Specified by:
sendPacket
in interfacePAFPlayer
- Overrides:
sendPacket
in classPAFPlayerClass
- Parameters:
chat
- The message which should be sent
-
sendPacket
public void sendPacket(net.md_5.bungee.api.chat.TextComponent chat) - Specified by:
sendPacket
in interfaceOnlinePAFPlayer
- Specified by:
sendPacket
in interfacePAFPlayer
- Overrides:
sendPacket
in classPAFPlayerClass
-
getDisplayName
- Specified by:
getDisplayName
in interfacePAFPlayer
- Overrides:
getDisplayName
in classPAFPlayerClass
- Returns:
- Returns the display name of a player. The display name is determined by a
DisplayNameProvider
. To register yourDisplayNameProvider
usePAFPlayerClass.setDisplayNameProvider(DisplayNameProvider)
-
update
public void update()- Specified by:
update
in interfaceOnlinePAFPlayer
-