java.lang.Object
com.olziedev.playerauctions.api.player.APlayer

public abstract class APlayer extends Object
Handles and manages all the player data.
  • Constructor Details

    • APlayer

      public APlayer()
  • Method Details

    • getUUID

      public abstract UUID getUUID()
      Returns:
      The UUID of the auction player.
    • getName

      public abstract String getName()
      Returns:
      The last known auction player's name.
    • getPlayer

      public abstract Player getPlayer()
      Returns:
      The Bukkit player instance.
    • getOfflinePlayer

      public abstract OfflinePlayer getOfflinePlayer()
      Returns:
      The Bukkit offline player instance.
    • getPlayerAuctions

      public abstract List<Auction> getPlayerAuctions()
      Returns:
      List of the current actions the player has.
    • getPlayerAuctions

      public abstract List<Auction> getPlayerAuctions(CommandSender sender)
      Parameters:
      sender - The command sender, this is to check if they can see specific warps or not.
      Returns:
      List of the current actions the player has.
    • getUsedAuctions

      public abstract long getUsedAuctions(CommandSender sender)
      Parameters:
      sender - The command sender, this is to check if they can see specific warps or not.
      Returns:
      The current active auctions the player has.
    • getRecentAuctions

      public abstract List<ARecent> getRecentAuctions(CommandSender sender)
      Parameters:
      sender - The command sender, this is to check if they can see specific warps or not.
      Returns:
      List of the recently sold/bought auctions by a player.
    • addRecentAuction

      public abstract void addRecentAuction(Auction auction, UUID target, double price, ACurrency currency, ASerializableProduct<?> product, RecentAuctionType type, Runnable runnable)
      Add a recent auction (sold/bought/auctioned) to the player.
      Parameters:
      auction - The auction object.
      target - The player's UUID who they bought/sold from
      price - The price of the auction.
      currency - THe currency used in the auction.
      product - The product of the auction.
      type - The type of the recent auction.
      runnable - Callback when the recent auction has been added.
    • getMaximumAuctions

      public abstract long getMaximumAuctions()
      Returns:
      The maximum amount of auctions a player can sell. Retrieves it from the permission or static amount.
    • getPrettyMaximumAuctions

      public abstract String getPrettyMaximumAuctions()
      Returns:
      The pretty maximum amount of auctions a player can sell. Retrieves it from the permission or static amount.
    • getStaticAuctions

      public abstract long getStaticAuctions()
      Returns:
      The static amount of auctions a player can sell.
    • getGUIPlayer

      public abstract AGUIPlayer getGUIPlayer()
      Returns:
      The GUIPlayer object, used for saving values when a GUI is opened.
    • refreshName

      public abstract void refreshName()
      Update the player's name for, called when joined. getName()
    • setStaticAuctions

      public abstract void setStaticAuctions(long addedAuctions)
      Modifies the static maximum auctions a player can set.
      Parameters:
      addedAuctions - Static maximum amount of auctions.
    • getSellPrice

      public abstract double getSellPrice()
      Returns:
      How much they will be charged when selling an auction.
    • getExpireTime

      public abstract int getExpireTime(boolean bid)
      Parameters:
      bid - If the time should be from a bid or not.
      Returns:
      How much expire time they will have when selling an auction.
    • getMessages

      public abstract List<String> getMessages()
      Returns:
      List of pending offline messages the player has.
    • manageMessage

      public abstract void manageMessage(String message, boolean add)
      Add or remove an offline message from a player.
      Parameters:
      message - The offline message the player should see when joined.
      add - Add a message or remove a message?
    • getLogs

      public abstract List<String> getLogs()
      Returns:
      List of the logged actions.
    • setLogs

      public abstract void setLogs(List<String> logs)
      Modifies the logged actions for this player.
      Parameters:
      logs - Logged actions.
    • getMadeOffline

      public abstract List<APlayer.ACurrencyContainer> getMadeOffline()
      Returns:
      How much a player has made offline.
    • addMadeOffline

      public abstract void addMadeOffline(String server, ACurrency currency, double amount)
      Modifies the amount the player has made when they are offline.
      Parameters:
      server - The server for this currency.
      currency - The currency to add the amount to.
      amount - The amount to add.
    • handleJoin

      public abstract void handleJoin(boolean title)
      Handles all the join notifications and economy updates for the player.
      Parameters:
      title - If the title for all the notifications should be added.
    • getLanguage

      public abstract String getLanguage()
      Returns:
      The language the player will receive messages in.
    • setLanguage

      public abstract void setLanguage(String language)
      Modifies the language the player will receive messages in.
      Parameters:
      language - The language that the plugin supports.