From 36e6702e8b72f7b28901795d62514fbc0b401744 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Fri, 17 May 2024 01:17:29 +0200 Subject: [PATCH] 2.8.18 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add „Plugin.Prefix“ in cofig.yml - Add Function: „Slots.Function.CloseGUI.Enable“ – With this function you can create a button to close the GUI --- CommandGUI V2/pom.xml | 4 +- .../Spigot/config/config/ConfigCreate.java | 1 + .../Spigot/config/config/SelectConfig.java | 13 ++++++- .../configConverter/ConfigConverter.java | 39 ++++++++++++++++++- .../config/functions/CreateFunctions.java | 7 ++-- .../config/languages/SelectMessages.java | 2 +- .../commandguiv2/Spigot/gui/GUIListener.java | 27 +++++++------ .../Spigot/objects/Obj_Select.java | 4 +- .../Spigot/objects/functions/Function.java | 3 ++ .../java/net/t2code/commandguiv2/Util.java | 2 +- .../Functions/functionDeclaration.yml | 3 ++ .../src/main/resources/configDeclaration.yml | 2 +- 12 files changed, 84 insertions(+), 23 deletions(-) diff --git a/CommandGUI V2/pom.xml b/CommandGUI V2/pom.xml index aa9e467..6cf0552 100644 --- a/CommandGUI V2/pom.xml +++ b/CommandGUI V2/pom.xml @@ -6,7 +6,7 @@ net.t2code CommandGUI_V2 - 2.8.16 + 2.8.18 jar T2C-CommandGUI @@ -76,7 +76,7 @@ net.t2code T2CodeLib - 16.2 + 16.4 provided diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/ConfigCreate.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/ConfigCreate.java index 65a4c7c..5b40dfa 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/ConfigCreate.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/ConfigCreate.java @@ -37,6 +37,7 @@ public class ConfigCreate { T2Cconfig.set("Plugin.language", "english", yamlConfiguration); T2Cconfig.set("Plugin.Currency", "$", yamlConfiguration); T2Cconfig.set("Plugin.DefaultGUI", "default", yamlConfiguration); + T2Cconfig.set("Plugin.Prefix", "&8[&4C&9GUI&8]", yamlConfiguration); if (Main.legacy){ T2Cconfig.set("Storage.Type", "YML", yamlConfiguration); diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/SelectConfig.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/SelectConfig.java index 49dc787..5a5ec19 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/SelectConfig.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/config/SelectConfig.java @@ -4,6 +4,7 @@ import net.t2code.commandguiv2.Spigot.Main; import net.t2code.commandguiv2.Spigot.config.configConverter.ConfigConverter; import net.t2code.commandguiv2.Spigot.config.languages.SelectMessages; import net.t2code.commandguiv2.Util; +import net.t2code.t2codelib.SPIGOT.api.debug.T2Cdebug; import net.t2code.t2codelib.SPIGOT.api.messages.T2Creplace; import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend; import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion; @@ -14,6 +15,7 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Objects; public class SelectConfig { public static void onSelect() { @@ -32,6 +34,9 @@ public class SelectConfig { if (yamlConfiguration.getInt("ConfigVersion") < 6) { ConfigConverter.removeBungeeOption(); } + if (yamlConfiguration.getInt("ConfigVersion") < 7) { + ConfigConverter.convert7(); + } } Debug = yamlConfiguration.getBoolean("Plugin.Debug"); @@ -43,6 +48,7 @@ public class SelectConfig { language = yamlConfiguration.getString("Plugin.language"); Currency = yamlConfiguration.getString("Plugin.Currency"); DefaultGUI = yamlConfiguration.getString("Plugin.DefaultGUI"); + prefix = T2Creplace.replace("", Objects.requireNonNull(yamlConfiguration.getString("Plugin.Prefix"))); storage = yamlConfiguration.getString("Storage.Type").toUpperCase(); @@ -191,7 +197,7 @@ public class SelectConfig { Sound_OpenInventory = sound_OpenInventory; } } catch (Exception e) { - T2Csend.console("§4\n§4\n§4\n" + SelectMessages.SoundNotFound.replace("[prefix]", Prefix) + T2Csend.console("§4\n§4\n§4\n" + SelectMessages.SoundNotFound.replace("[prefix]", prefix) .replace("[sound]", "§8OpenInventory: §6" + Sound_OpenInventory_input) + "§4\n§4\n§4\n"); Sound_OpenInventory = Sound.valueOf(soundOpenInventory); } @@ -285,6 +291,7 @@ public class SelectConfig { private static Boolean mysqlSSL; private static String DefaultGUI; + private static String prefix; private static Boolean UseItem_Enable; private static Boolean UseItem_AllowToggle; @@ -432,6 +439,10 @@ public class SelectConfig { return DefaultGUI; } + public static String getPrefix() { + return prefix; + } + public static Boolean getUseItem_Enable() { return UseItem_Enable; } diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/configConverter/ConfigConverter.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/configConverter/ConfigConverter.java index f5d5e5c..4cb0eb9 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/configConverter/ConfigConverter.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/configConverter/ConfigConverter.java @@ -1,5 +1,6 @@ package net.t2code.commandguiv2.Spigot.config.configConverter; +import com.sun.org.apache.xpath.internal.operations.Bool; import net.t2code.commandguiv2.Spigot.Main; import net.t2code.commandguiv2.Spigot.config.functions.CreateFunctions; import net.t2code.commandguiv2.Spigot.enums.FunctionItemEnum; @@ -17,7 +18,7 @@ import java.util.List; public class ConfigConverter { - public static void removeBungeeOption(){ + public static void removeBungeeOption() { File config = new File(Main.getPath(), "config.yml"); YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config); @@ -30,6 +31,7 @@ public class ConfigConverter { } } + public static void renameMainFolder() { if (new File("plugins/CommandGUI").exists() && !Main.getPath().exists()) { File oldF = new File("plugins/CommandGUI"); @@ -134,6 +136,7 @@ public class ConfigConverter { String serverChangeServer = yamlConfigurationOld.getString("Slots." + key + ".ServerChange.Server"); Boolean openGUIEnable = yamlConfigurationOld.getBoolean("Slots." + key + ".OpenGUI.Enable"); String openGUI = yamlConfigurationOld.getString("Slots." + key + ".OpenGUI.GUI"); + Boolean closeGUI = yamlConfiguration.getBoolean("Slots.Function.CloseGUI.Enable"); Boolean togglePermission = yamlConfigurationOld.getBoolean("Slots." + key + ".Toggle.Permission.Enable"); String togglePermissionPerm = yamlConfigurationOld.getString("Slots." + key + ".Toggle.Permission.Permission"); Boolean toggleUseItem = yamlConfigurationOld.getBoolean("Slots." + key + ".Toggle.UseItem.Enable"); @@ -163,7 +166,7 @@ public class ConfigConverter { CreateFunctions.createFunction(key, empty, itemAmount, playerHeadEnable, base64Enable, base64Value, playerWhoHasOpenedTheGUI, playerName, itemMaterial, itemName, lore, true, "", true, Arrays.asList("&8-----------------", "&4No Permission for this Function", "&8-----------------"), customSoundEnable, customSoundNoSound, customSoundSound, costEnable, "vault", "DIRT;5", 0, price, commandEnable, commandBungeeCommand, commandAsConsole, command, serverChange, - serverChangeServer, openGUIEnable, openGUI, togglePermission, togglePermissionPerm, toggleUseItem, messageEnable, message, setConfigEnable, configFilePath, + serverChangeServer, openGUIEnable, openGUI,closeGUI, togglePermission, togglePermissionPerm, toggleUseItem, messageEnable, message, setConfigEnable, configFilePath, configOptionPath, configOptionPremat, configStringValueLeft, configBooleanValueLeft, configIntegerValueLeft, configDoubleValueLeft, configListValueLeft, configStringValueRight, configBooleanValueRight, configIntegerValueRight, configDoubleValueRight, configListValueRight, pluginReloadEnable, pluginReloadCommand, false, FunctionVoteEnum.ADD, 0, false, FunctionItemEnum.REMOVE, "DIRT;5"); @@ -233,4 +236,36 @@ public class ConfigConverter { config.set(path, value); } } + + public static void convert7() { + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7] §4----------------------"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7]"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7] §4Config conversion to the new config structure starts!"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7]"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7] §4----------------------"); + + File f = new File(Main.getPath() + "/Functions/"); + File[] fileArray = f.listFiles(); + + for (File config : fileArray) { + if (config.getName().equals("functionDeclaration.yml")) continue; + String sub = config.getName().substring(config.getName().length() - 4); + if (sub.equals(".yml")) { + YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config); + + yamlConfiguration.set("Slots.Function.CloseGUI.Enable",false); + + try { + yamlConfiguration.save(config); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7] §4----------------------"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7]"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7] §4The conversion to the new config structure is completed!"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7]"); + T2Csend.console(Util.getPrefix() + " §7[§5ConfigConvert§7] §4----------------------"); + } } diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/functions/CreateFunctions.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/functions/CreateFunctions.java index 0e93870..265c857 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/functions/CreateFunctions.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/functions/CreateFunctions.java @@ -18,7 +18,7 @@ public class CreateFunctions { "&6Toggle UseItem", Arrays.asList("&bYou currently have the UseItem set to: %commandgui_useitem%"), true, "", true, Arrays.asList("&8-----------------", "&4No Permission for this Function", "&8-----------------"), false, false, "", false, "VAULT", "DIRT;5", 0, 0.0, false, false, false, Arrays.asList(), false, - "", false, "", false, "", true, true, + "", false, "", false,false, "", true, true, Arrays.asList("&bYour UseItem was set to: %commandgui_useitem%&b."), false, "", "", "String", "", false, 0, 0.0, Arrays.asList(), "", false, 0, 0.0, Arrays.asList(), false, "", @@ -30,7 +30,7 @@ public class CreateFunctions { "&8-----------------", "&eIf you find any errors or bugs,", "&eplease contact me so I can fix them.", "&8-----------------", "&5Discord: §7http://dc.t2code.net"), true, "", true, Arrays.asList("&8-----------------", "&4No Permission for this Function", "&8-----------------"), false, false, "", false, "VAULT", "DIRT;5", 0, 0.0, false, false, - false, Arrays.asList(), false, "", false, "", false, "", + false, Arrays.asList(), false, "", false, "", false,false, "", false, true, Arrays.asList("&6You can find more information on Discord: &ehttp://dc.t2code.net"), false, "", "", "String", "", false, 0, 0.0, Arrays.asList(), "", false, 0, 0.0, Arrays.asList(), false, "", @@ -40,7 +40,7 @@ public class CreateFunctions { public static void createFunction(String fileName, Boolean empty, Integer itemAmount, Boolean playerHeadEnable, Boolean base64Enable, String base64Value, Boolean playerWhoHasOpenedTheGUI, String playerName, String itemMaterial, String name, List lore, Boolean noPermMessageEnable, String customNoPermMessage, Boolean noPermLoreEnable, List noPermLore, Boolean customSoundEnable, Boolean customSoundNoSound, String customSoundSound, Boolean costEnable, String ecoModule, String ecoItem, Integer ecoVotePoints, Double ecoPrice, Boolean commandEnable, Boolean commandBungeeCommand, - Boolean commandAsConsole, List command, Boolean serverChange, String serverChangeServer, Boolean openGUIEnable, String openGUI, + Boolean commandAsConsole, List command, Boolean serverChange, String serverChangeServer, Boolean openGUIEnable, String openGUI,Boolean closeGUI, Boolean togglePermission, String togglePermissionPerm, Boolean toggleUseItem, Boolean messageEnable, List message, Boolean setConfigEnable, String configFilePath, String configOptionPath, String configOptionPremat, String configStringValueLeft, Boolean configBooleanValueLeft, Integer configIntegerValueLeft, Double configDoubleValueLeft, List configListValueLeft, String configStringValueRight, @@ -92,6 +92,7 @@ public class CreateFunctions { set("Slots.Function.ServerChange.Server", serverChangeServer == null ? "" : serverChangeServer, yamlConfiguration); set("Slots.Function.OpenGUI.Enable", openGUIEnable, yamlConfiguration); set("Slots.Function.OpenGUI.GUI", openGUI == null ? "" : openGUI, yamlConfiguration); + set("Slots.Function.CloseGUI.Enable", closeGUI, yamlConfiguration); set("Slots.Function.Toggle.Permission.Enable", togglePermission, yamlConfiguration); set("Slots.Function.Toggle.Permission.Permission", togglePermissionPerm == null ? "" : togglePermissionPerm, yamlConfiguration); diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/languages/SelectMessages.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/languages/SelectMessages.java index f5e5dfe..28eda51 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/languages/SelectMessages.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/config/languages/SelectMessages.java @@ -174,6 +174,6 @@ public class SelectMessages { } private static String select(String path, YamlConfiguration yamlConfiguration) { - return T2Creplace.replace(Util.getPrefix(), Objects.requireNonNull(yamlConfiguration.getString(path))); + return T2Creplace.replace(SelectConfig.getPrefix(), Objects.requireNonNull(yamlConfiguration.getString(path))); } } diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/gui/GUIListener.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/gui/GUIListener.java index 8ac5598..8170268 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/gui/GUIListener.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/gui/GUIListener.java @@ -1,6 +1,5 @@ package net.t2code.commandguiv2.Spigot.gui; -import net.t2code.commandguiv2.Spigot.cmdManagement.Help; import net.t2code.commandguiv2.Spigot.listener.ServerChange; import net.t2code.commandguiv2.Spigot.useItem.Events; import net.t2code.commandguiv2.Spigot.objects.functions.Function; @@ -64,6 +63,7 @@ public class GUIListener implements Listener { if (e.getSlot() != slot.slot) return; Function function = Main.functionHashMap.get(slot.function); if (slot.permission && !player.hasPermission(slot.permissionToSee)) return; + if (function.closeGUI_Enable) closeGUI(player); if (slot.permission && !player.hasPermission(slot.permissionToUse)) { if (function.noPermMessageEnable) { if (function.customNoPermMessage == null || function.customNoPermMessage.equals("")) { @@ -94,6 +94,7 @@ public class GUIListener implements Listener { if (function.toggleUseItem) return true; if (function.command_Enable) return true; if (function.openGUI_Enable) return true; + if (function.closeGUI_Enable) return true; if (function.message_Enable) return true; if (function.serverChange) return true; if (function.setConfigEnable) return true; @@ -149,6 +150,10 @@ public class GUIListener implements Listener { }.runTaskLater(plugin, 1L); } + private static void closeGUI(Player player){ + player.closeInventory(); + } + private static void message(Function slot, Player player) { player.closeInventory(); for (String msg : slot.message) { @@ -338,7 +343,11 @@ public class GUIListener implements Listener { } break; case VOTEPOINTS: - if (!T2Ceco.votePointsRemove(prefix, player, function.votePoints)) { + if (T2Ceco.votePointsRemove(prefix, player, function.votePoints)) { + T2Csend.player(player, SelectMessages.Buy_msg.replace("[itemname]", T2Creplace.replace(prefix, function.name)) + .replace("[price]", function.votePoints + " VotePoints")); + execute(function, slot, player, e, gui); + } else { new BukkitRunnable() { @Override public void run() { @@ -347,15 +356,15 @@ public class GUIListener implements Listener { }.runTaskLater(plugin, 1L); T2Csend.player(player, SelectMessages.noMoneyVote.replace("[amount]", function.votePoints.toString())); Sound.play(player, SoundEnum.NoMoney); - } else { - T2Csend.player(player, SelectMessages.Buy_msg.replace("[itemname]", T2Creplace.replace(prefix, function.name)) - .replace("[price]", function.votePoints + " VotePoints")); - execute(function, slot, player, e, gui); } break; case VAULT: case MONEY: - if (!T2Ceco.moneyRemove(prefix, player, function.price)) { + if (T2Ceco.moneyRemove(prefix, player, function.price)) { + T2Csend.player(player, SelectMessages.Buy_msg.replace("[itemname]", T2Creplace.replace(prefix, function.name)) + .replace("[price]", function.price + " " + SelectConfig.getCurrency())); + execute(function, slot, player, e, gui); + } else { new BukkitRunnable() { @Override public void run() { @@ -364,10 +373,6 @@ public class GUIListener implements Listener { }.runTaskLater(plugin, 1L); T2Csend.player(player, T2Creplace.replacePrice(prefix, SelectMessages.noMoney, String.valueOf(function.price))); Sound.play(player, SoundEnum.NoMoney); - } else { - T2Csend.player(player, SelectMessages.Buy_msg.replace("[itemname]", T2Creplace.replace(prefix, function.name)) - .replace("[price]", function.price + " " + SelectConfig.getCurrency())); - execute(function, slot, player, e, gui); } break; } diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/Obj_Select.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/Obj_Select.java index dd3114e..0532fc1 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/Obj_Select.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/Obj_Select.java @@ -1,5 +1,6 @@ package net.t2code.commandguiv2.Spigot.objects; +import com.sun.org.apache.xpath.internal.operations.Bool; import net.t2code.commandguiv2.Spigot.Main; import net.t2code.commandguiv2.Spigot.cmdManagement.CmdExecuter_GUI; import net.t2code.commandguiv2.Spigot.config.configConverter.ConfigConverter; @@ -149,6 +150,7 @@ public class Obj_Select { String serverChangeServer = yamlConfiguration.getString("Slots.Function.ServerChange.Server"); Boolean openGUI_Enable = yamlConfiguration.getBoolean("Slots.Function.OpenGUI.Enable"); String openGUI = yamlConfiguration.getString("Slots.Function.OpenGUI.GUI"); + Boolean closeGUI = yamlConfiguration.getBoolean("Slots.Function.CloseGUI.Enable"); Boolean togglePermission = yamlConfiguration.getBoolean("Slots.Function.Toggle.Permission.Enable"); String togglePermissionPerm = yamlConfiguration.getString("Slots.Function.Toggle.Permission.Permission"); Boolean toggleUseItem = yamlConfiguration.getBoolean("Slots.Function.Toggle.UseItem.Enable"); @@ -203,7 +205,7 @@ public class Obj_Select { Function function = new Function(key, empty, itemAmount, playerHead_Enable, base64_Enable, base64Value, playerWhoHasOpenedTheGUI, playerName, item, name, lore, noPermMessageEnable, customNoPermMessage, noPermLoreEnable, noPermLore, customSound_Enable, customSound_NoSound, customSound_Sound, cost_Enable, ecoModule, ecoItem, votePoints, price, command_Enable, command_BungeeCommand, - commandAsConsole, command, serverChange, serverChangeServer, openGUI_Enable, openGUI, togglePermission, togglePermissionPerm, toggleUseItem, message_Enable, + commandAsConsole, command, serverChange, serverChangeServer, openGUI_Enable, openGUI, closeGUI, togglePermission, togglePermissionPerm, toggleUseItem, message_Enable, message, setConfigEnable, configFilePath, configOptionPath, configOptionPremat, configStringValueLeft, configBooleanValueLeft, configIntegerValueLeft, configDoubleValueLeft, configListValueLeft, configStringValueRight, configBooleanValueRight, configIntegerValueRight, configDoubleValueRight, configListValueRight, pluginReloadEnable, pluginReloadCommand, functionVotePoints, functionVotePointsMode, functionVotePointsAmount, diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/functions/Function.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/functions/Function.java index 7cc2d6d..436036e 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/functions/Function.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Spigot/objects/functions/Function.java @@ -39,6 +39,7 @@ public class Function { public List command; public Boolean openGUI_Enable; public String openGUI; + public Boolean closeGUI_Enable; public Boolean togglePermission; public String togglePermissionPerm; public Boolean toggleUseItem; @@ -102,6 +103,7 @@ public class Function { String serverChangeServer, Boolean openGUI_Enable, String openGUI, + Boolean closeGUI, Boolean togglePermission, String togglePermissionPerm, Boolean toggleUseItem, @@ -163,6 +165,7 @@ public class Function { this.serverChangeServer = serverChangeServer; this.openGUI_Enable = openGUI_Enable; this.openGUI = openGUI; + this.closeGUI_Enable =closeGUI; this.togglePermission = togglePermission; this.togglePermissionPerm = togglePermissionPerm; this.toggleUseItem = toggleUseItem; diff --git a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Util.java b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Util.java index 7ef7026..4eee960 100644 --- a/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Util.java +++ b/CommandGUI V2/src/main/java/net/t2code/commandguiv2/Util.java @@ -35,6 +35,6 @@ public class Util { } public static Integer getConfigVersion() { - return 6; + return 7; } } diff --git a/CommandGUI V2/src/main/resources/Functions/functionDeclaration.yml b/CommandGUI V2/src/main/resources/Functions/functionDeclaration.yml index c68230b..7bd9c52 100644 --- a/CommandGUI V2/src/main/resources/Functions/functionDeclaration.yml +++ b/CommandGUI V2/src/main/resources/Functions/functionDeclaration.yml @@ -115,6 +115,9 @@ Slots: # Here you can set which GUI should be opened. # Use the file name of the GUI without .yml GUI: '' + CloseGUI: + # Here you can set a function to close the GUI. + Enable: false Toggle: # Here you can enable a feature that allows players to give or remove permissions to each other # The commands for the permission plugin can be set in the config (default for LuckPerms) diff --git a/CommandGUI V2/src/main/resources/configDeclaration.yml b/CommandGUI V2/src/main/resources/configDeclaration.yml index 202d722..5c5a68f 100644 --- a/CommandGUI V2/src/main/resources/configDeclaration.yml +++ b/CommandGUI V2/src/main/resources/configDeclaration.yml @@ -2,7 +2,7 @@ ######################################### ## Please do not change ConfigVersion! ## ######################################### -ConfigVersion: 6 +ConfigVersion: 7 Plugin: # Here you can set the debug mode of the plugin.