Class NAHUtil

java.lang.Object
cc.synkdev.nah.api.NAHUtil

public class NAHUtil extends Object
Main class used by the Developer API
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    ban(org.bukkit.Material m)
     
    static cc.synkdev.nah.objects.BINAuction
    Get an auction from its UUID
    static cc.synkdev.nah.objects.BINAuction
    Get an auction from its UUID
    static int
    getSlotsLimit(org.bukkit.entity.Player p)
    Read how many auctions a player can list
    static int
    getUsedSlots(org.bukkit.entity.Player p)
    Read how many auctions a player has currently listed
    static void
    open(org.bukkit.entity.Player p, Boolean force, String search, int page)
    Open the Auction House GUI for a player
    static void
    openExpiredGui(org.bukkit.entity.Player p)
    Open the GUI for expired items for a player
    static void
    openLogs(org.bukkit.entity.Player p)
    Open the logs GUI
    static Long
    Reload all the plugin configuration
    static void
    setExpiry(cc.synkdev.nah.objects.BINAuction bA, int expiry, String executor)
    Set the price of an auction
    static void
    setPrice(cc.synkdev.nah.objects.BINAuction bA, int price, String executor)
    Set the price of an auction
    static void
    Toggle the Auction House to the opposite state
    static void
    toggle(Boolean state)
    Toggle the Auction House to the specified state
    static void
    unban(org.bukkit.Material m)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NAHUtil

      public NAHUtil()
  • Method Details

    • toggle

      public static void toggle()
      Toggle the Auction House to the opposite state
    • toggle

      public static void toggle(Boolean state)
      Toggle the Auction House to the specified state
      Parameters:
      state - the state of the Auction House
    • open

      public static void open(org.bukkit.entity.Player p, Boolean force, String search, int page)
      Open the Auction House GUI for a player
      Parameters:
      p - the player
      force - whether to force opening the gui, ignoring permissions or toggle
      search - The search query (if null, displays all items)
      page - The page (anything below 1 will display the first page)
    • reload

      public static Long 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

      public static void setPrice(cc.synkdev.nah.objects.BINAuction bA, int price, String executor)
      Set the price of an auction
      Parameters:
      bA - The auction
      price - The new price
      executor - The person who sets the price (can be anything)
    • setExpiry

      public static void setExpiry(cc.synkdev.nah.objects.BINAuction bA, int expiry, String executor)
      Set the price of an auction
      Parameters:
      bA - The auction
      expiry - The new expiry timestamp
      executor - 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

      public static cc.synkdev.nah.objects.BINAuction getAuction(String uuid)
      Get an auction from its UUID
      Parameters:
      uuid - The auction's UUID
      Returns:
      The auction
    • getAuction

      public static cc.synkdev.nah.objects.BINAuction getAuction(UUID uuid)
      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