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 voidban(org.bukkit.Material m) static cc.synkdev.nah.objects.BINAuctiongetAuction(String uuid) Get an auction from its UUIDstatic cc.synkdev.nah.objects.BINAuctiongetAuction(UUID uuid) Get an auction from its UUIDstatic intgetSlotsLimit(org.bukkit.entity.Player p) Read how many auctions a player can liststatic intgetUsedSlots(org.bukkit.entity.Player p) Read how many auctions a player has currently listedstatic voidOpen the Auction House GUI for a playerstatic voidopenExpiredGui(org.bukkit.entity.Player p) Open the GUI for expired items for a playerstatic voidopenLogs(org.bukkit.entity.Player p) Open the logs GUIstatic Longreload()Reload all the plugin configurationstatic voidSet the price of an auctionstatic voidSet the price of an auctionstatic voidtoggle()Toggle the Auction House to the opposite statestatic voidToggle the Auction House to the specified statestatic voidunban(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
-