Added API function sortingEnabled(Player player)

This commit is contained in:
mfnalex 2019-04-26 12:25:44 +02:00
parent 8ec32c8df5
commit b5de10dd67
4 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# API Usage
If you want to use ChestSort's advanced sorting features for your own plugin, you can use the ChestSort API. It provides two methods to sort any given inventory, following the rules you have specified in your ChestSort's plugin.yml and the corresponding category files.
If you want to use ChestSort's advanced sorting features for your own plugin, you can use the ChestSort API. It provides methods to sort any given inventory, following the rules you have specified in your ChestSort's plugin.yml and the corresponding category files.
To use ChestSort's sorting features in your Spigot/Bukkit plugin, you have to import ChestSort.jar into your BuildPath.
@ -25,3 +25,9 @@ To sort only specific slots, you can pass slot numbers where to start and end so
```
chestSort.sortInventory(Inventory inventory, int startSlot, int endSlot);
```
You can also check if a player has automatic sorting enabled or disabled:
```
boolean sortingEnabled = chestSort.sortingEnabled(Player player);
```

View File

@ -5,7 +5,7 @@
<groupId>de.jeffclan</groupId>
<artifactId>JeffChestSort</artifactId>
<version>3.4</version>
<version>3.6</version>
<packaging>jar</packaging>
<name>JeffChestSort</name>

View File

@ -208,7 +208,7 @@ public class JeffChestSortPlugin extends JavaPlugin {
}
}
boolean sortingEnabled(Player p) {
public boolean sortingEnabled(Player p) {
// The following is for all the lazy server admins who use /reload instead of properly restarting their
// server ;) I am sometimes getting stacktraces although it is clearly stated that /reload is NOT

View File

@ -1,6 +1,6 @@
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
name: ChestSort
version: 3.5
version: 3.6
api-version: 1.13
description: Allows automatic chest sorting
author: mfnalex