Package de.jeff_media.chestsort.api
Class ChestSortAPI
java.lang.Object
de.jeff_media.chestsort.api.ChestSortAPI
Allows access to ChestSort's sorting methods
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasSortingEnabled(org.bukkit.entity.Player player)
Checks whether the givenPlayer
has automatic sorting enabledstatic void
setSortable(org.bukkit.inventory.Inventory inv)
Marks thisInventory
as sortablestatic void
setUnsortable(org.bukkit.inventory.Inventory inv)
Marks thisInventory
as unsortablestatic void
sortInventory(org.bukkit.inventory.Inventory inventory)
Sorts the givenInventory
static void
sortInventory(org.bukkit.inventory.Inventory inventory, int startSlot, int endSlot)
Sorts the givenInventory
from to
-
Constructor Details
-
ChestSortAPI
public ChestSortAPI()
-
-
Method Details
-
sortInventory
public static void sortInventory(org.bukkit.inventory.Inventory inventory)Sorts the givenInventory
- Parameters:
inventory
-Inventory
to be sorted
-
sortInventory
public static void sortInventory(org.bukkit.inventory.Inventory inventory, int startSlot, int endSlot)Sorts the givenInventory
from to- Parameters:
inventory
-Inventory
to be sortedstartSlot
- first slot to be sorted, inclusiveendSlot
- last slot to be sorted, inclusive
-
hasSortingEnabled
public static boolean hasSortingEnabled(org.bukkit.entity.Player player)Checks whether the givenPlayer
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 thisInventory
as sortable- Parameters:
inv
-Inventory
that should be marked as sortable
-
setUnsortable
public static void setUnsortable(org.bukkit.inventory.Inventory inv)Marks thisInventory
as unsortable- Parameters:
inv
-Inventory
that should be marked as unsortable
-