Interface PAFPlayer

All Known Subinterfaces:
IDBasedPAFPlayer, OnlinePAFPlayer
All Known Implementing Classes:
OnlinePAFPlayerMySQL, PAFPlayerClass, PAFPlayerMySQL

public interface PAFPlayer
  • 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 your DisplayNameProvider use PAFPlayerClass.setDisplayNameProvider(DisplayNameProvider)
    • getFriends

      List<PAFPlayer> getFriends()
    • getUniqueId

      UUID getUniqueId()
    • sendMessage

      void sendMessage(Object pMessage)
      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

      void sendMessage(List<String> pMessages)
      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

      void sendMessage(String pText)
      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 void sendPacket(net.md_5.bungee.protocol.packet.Chat chat)
      Deprecated.
      Please use sendPacket(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

      List<PAFPlayer> getRequests()
    • getFriendRequestCount

      int getFriendRequestCount()
    • hasRequestFrom

      boolean hasRequestFrom(PAFPlayer pPlayer)
    • hasPermission

      boolean hasPermission(String pPermission)
    • denyRequest

      void denyRequest(PAFPlayer pPlayer)
    • 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

      boolean isAFriendOf(PAFPlayer pPlayer)
    • getLastPlayerWroteTo

      PAFPlayer getLastPlayerWroteTo()
    • sendFriendRequest

      void sendFriendRequest(PAFPlayer pSender)
    • addFriend

      void addFriend(PAFPlayer pPlayer)
    • getPAFPlayer

      PAFPlayer getPAFPlayer()
    • removeFriend

      void removeFriend(PAFPlayer pPlayer)
    • setSetting

      void setSetting(int pSettingsID, int pNewWorth)
    • setLastPlayerWroteFrom

      void setLastPlayerWroteFrom(PAFPlayer pLastWroteTo)
    • getLastOnline

      long getLastOnline()
    • deleteAccount

      boolean deleteAccount()
    • updateLastOnline

      void updateLastOnline()