Class APlayer
java.lang.Object
com.olziedev.playerauctions.api.player.APlayer
Handles and manages all the player data.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Handles all the currency containers for the player. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addMadeOffline
(String server, ACurrency currency, double amount) Modifies the amount the player has made when they are offline.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.abstract int
getExpireTime
(boolean bid) abstract AGUIPlayer
abstract String
getLogs()
abstract List<APlayer.ACurrencyContainer>
abstract long
abstract String
getName()
abstract OfflinePlayer
abstract Player
getPlayerAuctions
(CommandSender sender) abstract String
getRecentAuctions
(CommandSender sender) abstract double
abstract long
abstract long
getUsedAuctions
(CommandSender sender) abstract UUID
getUUID()
abstract void
handleJoin
(boolean title) Handles all the join notifications and economy updates for the player.abstract void
manageMessage
(String message, boolean add) Add or remove an offline message from a player.abstract void
Update the player's name for, called when joined.abstract void
setLanguage
(String language) Modifies the language the player will receive messages in.abstract void
Modifies the logged actions for this player.abstract void
setStaticAuctions
(long addedAuctions) Modifies the static maximum auctions a player can set.
-
Constructor Details
-
APlayer
public APlayer()
-
-
Method Details
-
getUUID
- Returns:
- The UUID of the auction player.
-
getName
- Returns:
- The last known auction player's name.
-
getPlayer
- Returns:
- The Bukkit player instance.
-
getOfflinePlayer
- Returns:
- The Bukkit offline player instance.
-
getPlayerAuctions
- Returns:
- List of the current actions the player has.
-
getPlayerAuctions
- 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
- 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
- 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 fromprice
- 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
- 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
- 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
- Returns:
- List of pending offline messages the player has.
-
manageMessage
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
- Returns:
- List of the logged actions.
-
setLogs
Modifies the logged actions for this player.- Parameters:
logs
- Logged actions.
-
getMadeOffline
- Returns:
- How much a player has made offline.
-
addMadeOffline
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
- Returns:
- The language the player will receive messages in.
-
setLanguage
Modifies the language the player will receive messages in.- Parameters:
language
- The language that the plugin supports.
-