This commit is contained in:
mfnalex 2021-11-01 21:06:02 +01:00
parent 9b852b5e7a
commit 437a57e37d
4 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,8 @@
# Changelog
## 12.0.4
- Added config option "allow-gui" (defaults to true)
## 12.0.3
- Fixed some commands (e.g. /sort on|off|toggle) accidently opening the GUI

View File

@ -9,7 +9,7 @@
<name>ChestSort</name>
<url>https://www.chestsort.de</url>
<description>Allows automatic chest sorting!</description>
<version>12.0.3</version>
<version>12.0.4</version>
<packaging>jar</packaging>
<properties>

View File

@ -105,6 +105,10 @@ public class ChestSortCommand implements CommandExecutor {
if(!p.hasPermission("chestsort.automatic")) args = new String[]{"hotkeys"};
if(args.length==0 && plugin.getConfig().getBoolean("allow-gui",true) == false) {
args = new String[] {"toggle"};
}
if(args.length > 0 && (args[0].equalsIgnoreCase("hotkeys") || args[0].equalsIgnoreCase("hotkey"))) {
new NewUI(p).showGUI();
return true;

View File

@ -89,6 +89,9 @@ inv-sorting-enabled-by-default: false
# this to false.
allow-commands: true
# You can prevent players from using the GUI. When set to "false", /sort behaves like /sort toggle
allow-gui: true
# when set to true, players with sorting DISABLED will be
# shown a message on how to enable automatic chest sorting
# when they use a chest for the first time.