Package cc.synkdev.nah.api
Class NAHUtil
java.lang.Object
cc.synkdev.nah.api.NAHUtil
Main class used by the Developer API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
ban
(org.bukkit.Material m) static cc.synkdev.nah.objects.BINAuction
getAuction
(String uuid) Get an auction from its UUIDstatic cc.synkdev.nah.objects.BINAuction
getAuction
(UUID uuid) Get an auction from its UUIDstatic int
getSlotsLimit
(org.bukkit.entity.Player p) Read how many auctions a player can liststatic int
getUsedSlots
(org.bukkit.entity.Player p) Read how many auctions a player has currently listedstatic void
Open the Auction House GUI for a playerstatic void
openExpiredGui
(org.bukkit.entity.Player p) Open the GUI for expired items for a playerstatic void
openLogs
(org.bukkit.entity.Player p) Open the logs GUIstatic Long
reload()
Reload all the plugin configurationstatic void
Set the price of an auctionstatic void
Set the price of an auctionstatic void
toggle()
Toggle the Auction House to the opposite statestatic void
Toggle the Auction House to the specified statestatic void
unban
(org.bukkit.Material m)
-
Constructor Details
-
NAHUtil
public NAHUtil()
-
-
Method Details
-
toggle
public static void toggle()Toggle the Auction House to the opposite state -
toggle
Toggle the Auction House to the specified state- Parameters:
state
- the state of the Auction House
-
open
Open the Auction House GUI for a player- Parameters:
p
- the playerforce
- whether to force opening the gui, ignoring permissions or togglesearch
- The search query (if null, displays all items)page
- The page (anything below 1 will display the first page)
-
reload
Reload all the plugin configuration- Returns:
- The time it took to reload (for informational purposes)
-
openExpiredGui
public static void openExpiredGui(org.bukkit.entity.Player p) Open the GUI for expired items for a player- Parameters:
p
- The player
-
openLogs
public static void openLogs(org.bukkit.entity.Player p) Open the logs GUI- Parameters:
p
- The player
-
setPrice
Set the price of an auction- Parameters:
bA
- The auctionprice
- The new priceexecutor
- The person who sets the price (can be anything)
-
setExpiry
Set the price of an auction- Parameters:
bA
- The auctionexpiry
- The new expiry timestampexecutor
- The person who sets the price (can be anything)
-
ban
public static void ban(org.bukkit.Material m) -
unban
public static void unban(org.bukkit.Material m) -
getAuction
Get an auction from its UUID- Parameters:
uuid
- The auction's UUID- Returns:
- The auction
-
getAuction
Get an auction from its UUID- Parameters:
uuid
- The auction's UUID- Returns:
- The auction
-
getSlotsLimit
public static int getSlotsLimit(org.bukkit.entity.Player p) Read how many auctions a player can list- Parameters:
p
- The player- Returns:
- The slots cap
-
getUsedSlots
public static int getUsedSlots(org.bukkit.entity.Player p) Read how many auctions a player has currently listed- Parameters:
p
- The player- Returns:
- The used slots count
-