Interface PlayerData


public interface PlayerData
This interface allows you to view and change plugin data for a particular player.
  • Method Details

    • getName

      String getName()
      Gets the player's last known username.
    • getUniqueId

      UUID getUniqueId()
    • getPlayer

      Optional<ServerPlayer> getPlayer()
      Gets a ServerPlayer.
    • getUser

      Optional<User> getUser()
      Gets a User.
    • getHomes

      List<Home> getHomes()
      A collection of Home points.
    • getWarps

      List<Warp> getWarps()
      A collection of player Warp's.
    • getTotalHomes

      long getTotalHomes()
      The number of existing points at the player's home.
    • getTotalWarps

      long getTotalWarps()
      The number of existing points at the player's warps.
    • addHome

      boolean addHome(Home home, int limit)
      Add Home point.
    • removeHome

      boolean removeHome(String name)
      Remove Home point
    • addWarp

      boolean addWarp(Warp warp, int limit)
      Add Warp point.
    • removeWarp

      boolean removeWarp(String name)
      Remove Warp point
    • containsWarp

      boolean containsWarp(String name)
      Check for Warp exist by name.
    • getDefaultHome

      Optional<Home> getDefaultHome()
      Gets default Home point.
    • getHome

      Optional<Home> getHome(String name)
      Gets default Home point.
    • getWarp

      Optional<Warp> getWarp(String name)
      Get Warp whith name
    • getBackpack

      Backpack getBackpack()
      Viewing and changing a player's backpack.
    • setBackpack

      void setBackpack(Backpack backpack)
      Set a new backpack for the player.
    • homesListChatMenu

      List<Component> homesListChatMenu(Locale locale, boolean allowRemove)
      Getting a clickable chat menu with a list of homes.
      Parameters:
      locale - - Localization of chat buttons.
      allowRemove - - Allow deleting home points through the chat menu.
    • warpsListChatMenu

      List<Component> warpsListChatMenu(Locale locale, Predicate<Warp> allowRemove, Predicate<Warp> allowTeleport)
      Getting a clickable chat menu with a list of warps.
      Parameters:
      locale - - Localization of chat buttons.
      allowRemove - - Allow deleting warp points through the chat menu.
    • sendMessage

      void sendMessage(Component component)
      Sending a message to a player if he is online.
    • sendMessage

      void sendMessage(String string)
      Sending a message to a player if he is online.
    • getLastJoinTime

      long getLastJoinTime()
      Getting the time of the last login.
    • getLastExitTime

      long getLastExitTime()
      Getting the time of the last exit.
    • getKitGivedData

      @Nullable GivedKit getKitGivedData(Kit kit)
      Getting data on a previously issued kit to a player.
    • isGivedKit

      boolean isGivedKit(Kit kit)
      Check if the kit has been issued to a player before.
    • getKitGivedTime

      long getKitGivedTime(Kit kit)
      Get the time of the last time a set was issued to a player.
    • isHideBalance

      boolean isHideBalance()
      Whether the player's balance is hidden at this time. Used only in the CommandPack economy.
    • setHideBalance

      void setHideBalance(boolean hideBalance)
      Hiding/displaying player balance.
    • runCommand

      <ServerPlayer> CommandResult runCommand(Locale sourceLocale, String command) throws CommandException
      Forcing a player to use a command.
      Throws:
      CommandException
    • save

      PlayerData save()