mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-11-27 04:55:31 +01:00
Update HOW_TO_USE_API.md
This commit is contained in:
parent
e6cb527e6a
commit
92bc0c4dd5
@ -4,16 +4,16 @@ You have to import ChestSort.jar into your BuildPath.
|
||||
Then you can access it via the plugin manager:
|
||||
|
||||
```
|
||||
JeffChestSortPlugin chestSort = (JeffChestSortPlugin) getServer().getPluginManager().getPlugin("ChestSort");
|
||||
JeffChestSortPlugin chestSort = (JeffChestSortPlugin) getServer().getPluginManager().getPlugin("ChestSort");
|
||||
|
||||
if(chestSort==null || !(chestSort instanceof JeffChestSortPlugin)) {
|
||||
getLogger().warning("ChestSort plugin not found.");
|
||||
}
|
||||
if(chestSort==null || !(chestSort instanceof JeffChestSortPlugin)) {
|
||||
getLogger().warning("ChestSort plugin not found.");
|
||||
}
|
||||
```
|
||||
|
||||
Now, you can sort any Inventory! Just like this:
|
||||
|
||||
```
|
||||
Inventory inv = ...
|
||||
chestSort.sortInventory(inv);
|
||||
```
|
||||
Inventory inv = ...
|
||||
chestSort.sortInventory(inv);
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user