mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-01-22 08:02:33 +01:00
Update HOW_TO_USE_API.md
This commit is contained in:
parent
b4eacf1f91
commit
5d5eb4b8e4
@ -42,8 +42,7 @@ ChestSortAPI.sortInventory(player.getInventory());
|
|||||||
```
|
```
|
||||||
|
|
||||||
### As `softdepend`
|
### As `softdepend`
|
||||||
If you only softdepend on ChestSort, you have to check whether ChestSort is installed. To avoid exceptions, do not import the ChestSortAPI class
|
If you only softdepend on ChestSort, you have to check whether ChestSort is installed:
|
||||||
in classes that you instantiate regardless of whether ChestSort is installed, but use qualified method calls instead:
|
|
||||||
|
|
||||||
```java
|
```java
|
||||||
if(Bukkit.getPluginManager().getPlugin("ChestSort") != null) {
|
if(Bukkit.getPluginManager().getPlugin("ChestSort") != null) {
|
||||||
@ -137,4 +136,4 @@ Here is a complete example plugin that shows to add and use the ChestSort API: [
|
|||||||
|
|
||||||
If you need help using the API, feel free to join my Discord server:
|
If you need help using the API, feel free to join my Discord server:
|
||||||
|
|
||||||
[![Join my Discord](https://api.jeff-media.de/img/discord1.png)](https://discord.jeff-media.de)
|
[![Join my Discord](https://api.jeff-media.de/img/discord1.png)](https://discord.jeff-media.de)
|
||||||
|
Loading…
Reference in New Issue
Block a user