diff --git a/CHANGELOG.md b/CHANGELOG.md
index 188704a..166890f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
## 8.12.0
- Changed name of command /chestsort to /sort. You can still use /chestsort though.
- Fixed weird config updater problem on systems that don't properly support UTF-8 (like Windows)
-- Improved help messages
+- Improved help messages and added /sort help and /invsort help commands
- Huge code cleanup
- Improved performance by caching Reflection checks in the Minepacks hook
diff --git a/HOW_TO_USE_API.md b/HOW_TO_USE_API.md
index a36e47c..1df4a67 100644
--- a/HOW_TO_USE_API.md
+++ b/HOW_TO_USE_API.md
@@ -16,7 +16,7 @@ You can use maven to add ChestSort as a dependency to your Spigot-/Bukkit-Plugin
de.jeff_media
ChestSort
- 8.10.5
+ 8.12.0
provided
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java b/src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java
index 923dc67..9b7012c 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java
@@ -36,6 +36,10 @@ public class ChestSortChestSortCommand implements CommandExecutor {
return true;
}
+ if(args.length>0 && args[0].equalsIgnoreCase("help")) {
+ return false;
+ }
+
if (!(sender instanceof Player)) {
if(args.length!=0) {
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java b/src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java
index 6da8607..e893bd4 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java
@@ -21,6 +21,10 @@ public class ChestSortInvSortCommand implements CommandExecutor {
if (!command.getName().equalsIgnoreCase("invsort")) {
return false;
}
+
+ if(args.length>0 && args[0].equalsIgnoreCase("help")) {
+ return false;
+ }
if (!(sender instanceof Player)) {
sender.sendMessage(plugin.messages.MSG_PLAYERSONLY);
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java b/src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java
index b0bd567..b17b531 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java
@@ -10,8 +10,8 @@ import org.jetbrains.annotations.NotNull;
public class ChestSortTabCompleter implements TabCompleter {
- static final String[] chestsortOptions = { "toggle","on","off","hotkeys" };
- static final String[] invsortOptions = { "toggle","on","off","all", "hotbar", "inv" };
+ static final String[] chestsortOptions = { "toggle","on","off","hotkeys","help" };
+ static final String[] invsortOptions = { "toggle","on","off","all", "hotbar", "inv","help" };
private List getMatchingOptions(String entered, String[] options) {
List list = new ArrayList<>();
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 4db0fdf..ab40210 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -11,22 +11,26 @@ loadbefore: [InvUnload]
softdepend: [CrackShot,InventoryPages,Minepacks]
commands:
sort:
- description: Toggle automatic chest sorting.
+ description: Toggle automatic chest sorting or change your hotkey settings
usage: |
- / -- Toggles automatic chest sorting
- / on|off -- Enables/disabled automatic chest sorting
- / hotkeys -- Opens hotkeys GUI to enable/disable hotkeys
+ / -- Toggle automatic chest sorting
+ / on -- Enable automatic chest sorting
+ / off -- Disable automatic chest sorting
+ / hotkeys -- Change your hotkey settings
/ reload -- Reloads config
+ / help -- Shows help about this command
aliases: chestsort
permission: chestsort.use
invsort:
- description: Toggle automatic inventory sorting or sorts the player's inventory. When no option is specified, only the regular inventory (excluding the hotbar) is sorted.
+ description: Toggle automatic inventory sorting or sorts the player's inventory.
usage: |
- / toggle -- Toggles automatic inventory sorting
- / on|off -- Enables/disables automatic inventory sorting
- / inv -- Sorts your inventory
- / hotbar -- Sorts your hotbar
- / all -- Sorts your inventory and hotbar
+ / toggle -- Toggle automatic inventory sorting
+ / on -- Enable automatic inventory sorting
+ / off -- Disable automatic inventory sorting
+ / inv -- Sort your inventory
+ / hotbar -- Sort your hotbar
+ / all -- Sort your inventory and hotbar
+ / help -- Shows help about this command
aliases: [isort,inventorysort]
permission: chestsort.use.inventory
permissions: