Interface PAFPlayer
- All Known Subinterfaces:
IDBasedPAFPlayer,OnlinePAFPlayer
- All Known Implementing Classes:
OnlinePAFPlayerMySQL,PAFPlayerClass,PAFPlayerMySQL
public interface PAFPlayer
-
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoiddenyRequest(PAFPlayer pPlayer) booleanintlonggetName()intgetSettingsWorth(int pSettingsID) booleanhasPermission(String pPermission) booleanhasRequestFrom(PAFPlayer pPlayer) booleanisAFriendOf(PAFPlayer pPlayer) booleanisOnline()voidremoveFriend(PAFPlayer pPlayer) voidsendFriendRequest(PAFPlayer pSender) voidsendMessage(Object pMessage) Sends a message to a player if he is onlinevoidsendMessage(String pText) Sends a message to a player if he is online.voidsendMessage(List<String> pMessages) Sends a random message from the list to the player if he is onlinevoidsendMessage(net.md_5.bungee.api.chat.TextComponent pTextComponent) Sends a message to the player if he is onlinevoidsendPacket(net.md_5.bungee.api.chat.TextComponent chat) voidsendPacket(net.md_5.bungee.protocol.packet.Chat chat) Deprecated.voidsetLastPlayerWroteFrom(PAFPlayer pLastWroteTo) voidsetSetting(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 yourDisplayNameProviderusePAFPlayerClass.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()
-