mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-02-03 14:01:52 +01:00
Added API function sortingEnabled(Player player)
This commit is contained in:
parent
8ec32c8df5
commit
b5de10dd67
@ -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);
|
||||
```
|
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user