Class ChestSortAPI

java.lang.Object
de.jeff_media.chestsort.api.ChestSortAPI

public class ChestSortAPI extends Object
Allows access to ChestSort's sorting methods
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    hasSortingEnabled​(org.bukkit.entity.Player player)
    Checks whether the given Player has automatic sorting enabled
    static void
    setSortable​(org.bukkit.inventory.Inventory inv)
    Marks this Inventory as sortable
    static void
    setUnsortable​(org.bukkit.inventory.Inventory inv)
    Marks this Inventory as unsortable
    static void
    sortInventory​(org.bukkit.inventory.Inventory inventory)
    Sorts the given Inventory
    static void
    sortInventory​(org.bukkit.inventory.Inventory inventory, int startSlot, int endSlot)
    Sorts the given Inventory from to

    Methods inherited from class java.lang.Object

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

    • ChestSortAPI

      public ChestSortAPI()
  • Method Details

    • sortInventory

      public static void sortInventory(org.bukkit.inventory.Inventory inventory)
      Sorts the given Inventory
      Parameters:
      inventory - Inventory to be sorted
    • sortInventory

      public static void sortInventory(org.bukkit.inventory.Inventory inventory, int startSlot, int endSlot)
      Sorts the given Inventory from to
      Parameters:
      inventory - Inventory to be sorted
      startSlot - first slot to be sorted, inclusive
      endSlot - last slot to be sorted, inclusive
    • hasSortingEnabled

      public static boolean hasSortingEnabled(org.bukkit.entity.Player player)
      Checks whether the given Player has automatic sorting enabled
      Parameters:
      player - Player to check
      Returns:
      True when this Player has sorting enabled, otherwise false
    • setSortable

      public static void setSortable(org.bukkit.inventory.Inventory inv)
      Marks this Inventory as sortable
      Parameters:
      inv - Inventory that should be marked as sortable
    • setUnsortable

      public static void setUnsortable(org.bukkit.inventory.Inventory inv)
      Marks this Inventory as unsortable
      Parameters:
      inv - Inventory that should be marked as unsortable