diff --git a/.gradle/7.1.1/executionHistory/executionHistory.bin b/.gradle/7.1.1/executionHistory/executionHistory.bin index 63e13b5f0..963e6c257 100644 Binary files a/.gradle/7.1.1/executionHistory/executionHistory.bin and b/.gradle/7.1.1/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.1.1/executionHistory/executionHistory.lock b/.gradle/7.1.1/executionHistory/executionHistory.lock index 2574d53e9..14f902a00 100644 Binary files a/.gradle/7.1.1/executionHistory/executionHistory.lock and b/.gradle/7.1.1/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.1.1/fileHashes/fileHashes.bin b/.gradle/7.1.1/fileHashes/fileHashes.bin index d35b472ca..e331caed1 100644 Binary files a/.gradle/7.1.1/fileHashes/fileHashes.bin and b/.gradle/7.1.1/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.1.1/fileHashes/fileHashes.lock b/.gradle/7.1.1/fileHashes/fileHashes.lock index 0cf911ac7..1b4bb0603 100644 Binary files a/.gradle/7.1.1/fileHashes/fileHashes.lock and b/.gradle/7.1.1/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 7afbf303c..1dd8902d5 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/build/resources/main/general.yml b/build/resources/main/general.yml index 135e0fb92..e92efa5d6 100644 --- a/build/resources/main/general.yml +++ b/build/resources/main/general.yml @@ -11,3 +11,5 @@ gui: questpreview: # If set to false, clickable text will be used for Quest Previews instead enabled: true + usercommands: + enabled: true diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index f129e8788..24dd80aec 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/main/java/notquests/notquests/Commands/CommandNotQuests.java b/src/main/java/notquests/notquests/Commands/CommandNotQuests.java index b11d76beb..650f7c218 100644 --- a/src/main/java/notquests/notquests/Commands/CommandNotQuests.java +++ b/src/main/java/notquests/notquests/Commands/CommandNotQuests.java @@ -65,11 +65,11 @@ public CommandNotQuests(NotQuests main) { @Override public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) { if (sender instanceof Player player) { - boolean guiEnabled = true; - if (label.equalsIgnoreCase("qg")) { - guiEnabled = false; + boolean guiEnabled = main.getDataManager().getConfiguration().isUserCommandsUseGUI(); + //if (label.equalsIgnoreCase("qg")) { + //guiEnabled = false; //player.sendMessage("§aOpening NotQuests GUI §1[BETA]"); - } + //} if (sender.hasPermission("notnot.quests.use")) { QuestPlayer questPlayer = main.getQuestPlayerManager().getQuestPlayer((player.getUniqueId())); sender.sendMessage(""); diff --git a/src/main/java/notquests/notquests/Managers/Configuration.java b/src/main/java/notquests/notquests/Managers/Configuration.java index 6256c7dd6..173a4db42 100644 --- a/src/main/java/notquests/notquests/Managers/Configuration.java +++ b/src/main/java/notquests/notquests/Managers/Configuration.java @@ -17,6 +17,7 @@ public class Configuration { private int port; private boolean questPreviewUseGUI = true; + private boolean userCommandsUseGUI = true; private boolean mySQLEnabled = false; public Configuration(){ @@ -78,4 +79,13 @@ public final boolean isMySQLEnabled(){ public void setMySQLEnabled(final boolean mySQLEnabled){ this.mySQLEnabled = mySQLEnabled; } + + + public final boolean isUserCommandsUseGUI() { + return userCommandsUseGUI; + } + + public void setUserCommandsUseGUI(final boolean userCommandsUseGUI) { + this.userCommandsUseGUI = userCommandsUseGUI; + } } diff --git a/src/main/java/notquests/notquests/Managers/DataManager.java b/src/main/java/notquests/notquests/Managers/DataManager.java index 42f711af8..cdeca530d 100644 --- a/src/main/java/notquests/notquests/Managers/DataManager.java +++ b/src/main/java/notquests/notquests/Managers/DataManager.java @@ -277,6 +277,11 @@ public final void loadGeneralConfig() { } configuration.setQuestPreviewUseGUI(getGeneralConfig().getBoolean("gui.questpreview.enabled")); + if(!getGeneralConfig().isBoolean("gui.usercommands.enabled")){ + getGeneralConfig().set("gui.usercommands.enabled", true); + } + configuration.setUserCommandsUseGUI(getGeneralConfig().getBoolean("gui.usercommands.enabled")); + saveGeneralConfig(); diff --git a/src/main/resources/general.yml b/src/main/resources/general.yml index 135e0fb92..e92efa5d6 100644 --- a/src/main/resources/general.yml +++ b/src/main/resources/general.yml @@ -11,3 +11,5 @@ gui: questpreview: # If set to false, clickable text will be used for Quest Previews instead enabled: true + usercommands: + enabled: true