From 675a5651ef2507e3c55272e052febe4981fb25c9 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Wed, 22 Dec 2021 19:52:19 +0100 Subject: [PATCH] Final 2.5.14 --- CommandGUI V2/pom.xml | 4 ++-- .../jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java | 1 + .../Spigot/cmdManagement/CmdExecuter_Admin.java | 8 ++++---- .../commandguiv2/Spigot/cmdManagement/Commands.java | 5 ++--- .../Spigot/cmdManagement/register/AliasRegister.java | 10 ---------- .../main/java/de/jatitv/commandguiv2/api/CGuiAPI.java | 6 +++--- CommandGUI V2/src/main/resources/config.yml | 1 + 7 files changed, 13 insertions(+), 22 deletions(-) diff --git a/CommandGUI V2/pom.xml b/CommandGUI V2/pom.xml index 6629495..c59c89d 100644 --- a/CommandGUI V2/pom.xml +++ b/CommandGUI V2/pom.xml @@ -6,7 +6,7 @@ net.t2code CommandGUI_V2 - 2.5.12 + 2.5.14 jar CommandGUI @@ -81,7 +81,7 @@ net.t2code T2CodeLib - 7.4 + 8 net.t2code.minecraft.1_18.r1 diff --git a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java index 87c0173..59e1739 100644 --- a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java +++ b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java @@ -17,6 +17,7 @@ public class Obj_Select { File[] fileArray = f.listFiles(); for (File config_gui : fileArray) { + Main.allAliases.add(config_gui.getName().replace(".yml", "")); String sub = config_gui.getName().substring(config_gui.getName().length() - 4); if (sub.equals(".yml")) { diff --git a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/CmdExecuter_Admin.java b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/CmdExecuter_Admin.java index 57107d4..c7a7b28 100644 --- a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/CmdExecuter_Admin.java +++ b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/CmdExecuter_Admin.java @@ -31,7 +31,7 @@ public class CmdExecuter_Admin implements CommandExecutor, TabCompleter { if (sender.hasPermission("commandgui.command.info")) { Commands.info(sender); } else sender.sendMessage(SelectMessages.NoPermissionForCommand - .replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.command.info")); + .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.command.info")); break; case "reload": @@ -39,14 +39,14 @@ public class CmdExecuter_Admin implements CommandExecutor, TabCompleter { if (sender.hasPermission("commandgui.admin")) { Commands.reload(sender); } else sender.sendMessage(SelectMessages.NoPermissionForCommand - .replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); + .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin")); break; case "createdefaultgui": if (sender.hasPermission("commandgui.admin")) { DefaultGUICreate.configCreate(); sender.sendMessage(SelectMessages.DefaultGUIcreate.replace("[directory]", Main.getPath() + "/GUIs/default.yml")); } else sender.sendMessage(SelectMessages.NoPermissionForCommand - .replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); + .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin")); break; case "debug": if (sender.hasPermission("commandgui.admin")) { @@ -63,7 +63,7 @@ public class CmdExecuter_Admin implements CommandExecutor, TabCompleter { } else Debug.debugmsg(); */ - } else sender.sendMessage(SelectMessages.NoPermissionForCommand.replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); + } else sender.sendMessage(SelectMessages.NoPermissionForCommand.replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin")); break; case "give": diff --git a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/Commands.java b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/Commands.java index 6bd2dd4..3cd2c6a 100644 --- a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/Commands.java +++ b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/Commands.java @@ -39,15 +39,12 @@ public class Commands { send.player(player, prefix + "§4======= §8[§4Command§9GUI§8] §4======="); send.player(player, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", "")); - - if (UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion.equalsIgnoreCase(version)) { send.player(player, prefix + " §2Version: §6" + version); } else { UpdateAPI.sendUpdateMsg(prefix,spigot,discord,version,UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion,player); } - send.player(player, prefix + " §2Spigot: §6" + spigot); send.player(player, prefix + " §2Discord: §6" + discord); send.player(player, prefix + "§4======= §8[§4Command§9GUI§8] §4======="); @@ -73,6 +70,8 @@ public class Commands { send.console(prefix + " §6Plugin reload..."); send.console(prefix + "§8-------------------------------"); + CmdExecuter_GUI.arg1.clear(); + CmdExecuter_GUI.arg1.put("admin", "commandgui.admin;commandgui.giveitem.other;commandgui.command.info"); ConfigCreate.configCreate(); SelectConfig.onSelect(); plugin.reloadConfig(); diff --git a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/register/AliasRegister.java b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/register/AliasRegister.java index bd204ae..b942040 100644 --- a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/register/AliasRegister.java +++ b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/cmdManagement/register/AliasRegister.java @@ -110,17 +110,7 @@ public class AliasRegister { org.bukkit.craftbukkit.v1_18_R1.CraftServer craftServer = (org.bukkit.craftbukkit.v1_18_R1.CraftServer) plugin.getServer(); craftServer.getCommandMap().register(alias, new RegisterCommand(alias)); } - if (Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R1")) { - send.debug(plugin, "Alias register 1.18_R1"); - send.warning(Main.plugin, "Alias commands of the GUIs not available! 1.18 is not yet supported with this version!"); - // org.bukkit.craftbukkit.v1_18_R1.CraftServer craftServer = (org.bukkit.craftbukkit.v1_18_R1.CraftServer) plugin.getServer(); - // craftServer.getCommandMap().register(alias, new RegisterCommand(alias)); - //todo 1.18 - - } - } - } } } diff --git a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/api/CGuiAPI.java b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/api/CGuiAPI.java index edf9f46..3c01ad3 100644 --- a/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/api/CGuiAPI.java +++ b/CommandGUI V2/src/main/java/de/jatitv/commandguiv2/api/CGuiAPI.java @@ -58,7 +58,7 @@ public class CGuiAPI { if (sender.hasPermission("commandgui.command.info")) { Commands.info(sender); } else sender.sendMessage(SelectMessages.NoPermissionForCommand - .replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.command.info")); + .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.command.info")); } public static void createDefaultGUI(CommandSender sender) { @@ -66,14 +66,14 @@ public class CGuiAPI { DefaultGUICreate.configCreate(); sender.sendMessage(SelectMessages.DefaultGUIcreate.replace("[directory]", Main.getPath() + "\\GUIs\\default.yml")); } else sender.sendMessage(SelectMessages.NoPermissionForCommand - .replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); + .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin")); } public static void reload(CommandSender sender) { if (sender.hasPermission("commandgui.admin")) { Commands.reload(sender); } else sender.sendMessage(SelectMessages.NoPermissionForCommand - .replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); + .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin")); } diff --git a/CommandGUI V2/src/main/resources/config.yml b/CommandGUI V2/src/main/resources/config.yml index c9de938..720202c 100644 --- a/CommandGUI V2/src/main/resources/config.yml +++ b/CommandGUI V2/src/main/resources/config.yml @@ -1,4 +1,5 @@ MySQL: + Enable: false IP: localhost Port: 3306 Database: database