Class PAFPlayerClass
java.lang.Object
de.simonsator.partyandfriends.api.pafplayers.PAFPlayerClass
- All Implemented Interfaces:
PAFPlayer
- Direct Known Subclasses:
PAFPlayerMySQL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static DisplayNameProvider
static ServerConnector
int
hashCode()
boolean
isOnline()
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) Please usePAFPlayer.sendPacket(TextComponent)
insteadstatic void
setDisplayNameProvider
(DisplayNameProvider pDisplayNameProvider) static void
setServerConnector
(ServerConnector pServerConnector) Sets the server connector, which will be used to join a server.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.simonsator.partyandfriends.api.pafplayers.PAFPlayer
addFriend, deleteAccount, denyRequest, doesExist, getFriendRequestCount, getFriends, getLastOnline, getLastPlayerWroteTo, getName, getPAFPlayer, getRequests, getSettingsWorth, getUniqueId, hasPermission, hasRequestFrom, isAFriendOf, removeFriend, sendFriendRequest, setLastPlayerWroteFrom, setSetting, updateLastOnline
-
Constructor Details
-
PAFPlayerClass
public PAFPlayerClass()
-
-
Method Details
-
getServerConnector
-
setServerConnector
Sets the server connector, which will be used to join a server.- Parameters:
pServerConnector
- The connector
-
getDisplayNameProvider
-
setDisplayNameProvider
-
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
- Parameters:
pTextComponent
- The message
-
sendMessage
Description copied from interface:PAFPlayer
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- Specified by:
sendMessage
in interfacePAFPlayer
- Parameters:
pText
- The message which should be sent
-
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 interfacePAFPlayer
- Parameters:
chat
- The message which should be sent
-
sendPacket
public void sendPacket(net.md_5.bungee.api.chat.TextComponent chat) - Specified by:
sendPacket
in interfacePAFPlayer
-
hashCode
public int hashCode() -
equals
-
toString
-
getDisplayName
- Specified by:
getDisplayName
in interfacePAFPlayer
- Returns:
- Returns the display name of a player. The display name is determined by a
DisplayNameProvider
. To register yourDisplayNameProvider
usesetDisplayNameProvider(DisplayNameProvider)
-
sendMessage
Description copied from interface:PAFPlayer
Sends a message to a player if he is online- Specified by:
sendMessage
in interfacePAFPlayer
- 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
Description copied from interface:PAFPlayer
Sends a random message from the list to the player if he is online- Specified by:
sendMessage
in interfacePAFPlayer
- Parameters:
pMessages
- A list of messages
-
isOnline
public boolean isOnline()- Specified by:
isOnline
in interfacePAFPlayer
- 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
-