Interface PAFPlayer
- All Known Subinterfaces:
IDBasedPAFPlayer
,OnlinePAFPlayer
- All Known Implementing Classes:
OnlinePAFPlayerMySQL
,PAFPlayerClass
,PAFPlayerMySQL
public interface PAFPlayer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
void
denyRequest
(PAFPlayer pPlayer) boolean
int
long
getName()
int
getSettingsWorth
(int pSettingsID) boolean
hasPermission
(String pPermission) boolean
hasRequestFrom
(PAFPlayer pPlayer) boolean
isAFriendOf
(PAFPlayer pPlayer) boolean
isOnline()
void
removeFriend
(PAFPlayer pPlayer) void
sendFriendRequest
(PAFPlayer pSender) void
sendMessage
(Object pMessage) Sends a message to a player if he is onlinevoid
sendMessage
(String pText) Sends a message to a player if he is online.void
sendMessage
(List<String> pMessages) Sends a random message from the list to the player if he is onlinevoid
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) Deprecated.void
setLastPlayerWroteFrom
(PAFPlayer pLastWroteTo) void
setSetting
(int pSettingsID, int pNewWorth) void
-
Method Details
-
getName
String getName() -
getDisplayName
String getDisplayName()- Returns:
- Returns the display name of a player. The display name is determined by a
DisplayNameProvider
. To register yourDisplayNameProvider
usePAFPlayerClass.setDisplayNameProvider(DisplayNameProvider)
-
getFriends
-
getUniqueId
UUID getUniqueId() -
sendMessage
Sends a message to a player if he is online- Parameters:
pMessage
- The message which should be sent. Can either be a string or a list of messages (a random one from the list will be sent)
-
sendMessage
Sends a random message from the list to the player if he is online- Parameters:
pMessages
- A list of messages
-
sendMessage
void sendMessage(net.md_5.bungee.api.chat.TextComponent pTextComponent) Sends a message to the player if he is online- Parameters:
pTextComponent
- The message
-
sendMessage
Sends a message to a player if he is online. The message will be broken into two messages if LINE_BREAK is used in the message- Parameters:
pText
- The message which should be sent
-
sendPacket
Deprecated.Please usesendPacket(TextComponent)
instead- Parameters:
chat
- The message which should be sent
-
sendPacket
void sendPacket(net.md_5.bungee.api.chat.TextComponent chat) -
doesExist
boolean doesExist()- Returns:
- Returns true if the player exists in the database. Returns false otherwise.
-
getSettingsWorth
int getSettingsWorth(int pSettingsID) -
getRequests
-
getFriendRequestCount
int getFriendRequestCount() -
hasRequestFrom
-
hasPermission
-
denyRequest
-
isOnline
boolean isOnline()- 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
-
isAFriendOf
-
getLastPlayerWroteTo
PAFPlayer getLastPlayerWroteTo() -
sendFriendRequest
-
addFriend
-
getPAFPlayer
PAFPlayer getPAFPlayer() -
removeFriend
-
setSetting
void setSetting(int pSettingsID, int pNewWorth) -
setLastPlayerWroteFrom
-
getLastOnline
long getLastOnline() -
deleteAccount
boolean deleteAccount() -
updateLastOnline
void updateLastOnline()
-