Final 2.5.14

This commit is contained in:
JaTiTV 2021-12-22 19:52:19 +01:00
parent 3792e0ebfc
commit 675a5651ef
7 changed files with 13 additions and 22 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId> <artifactId>CommandGUI_V2</artifactId>
<version>2.5.12</version> <version>2.5.14</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>CommandGUI</name> <name>CommandGUI</name>
@ -81,7 +81,7 @@
<dependency> <dependency>
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>7.4</version> <version>8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.t2code.minecraft.1_18.r1</groupId> <groupId>net.t2code.minecraft.1_18.r1</groupId>

View File

@ -17,6 +17,7 @@ public class Obj_Select {
File[] fileArray = f.listFiles(); File[] fileArray = f.listFiles();
for (File config_gui : fileArray) { for (File config_gui : fileArray) {
Main.allAliases.add(config_gui.getName().replace(".yml", "")); Main.allAliases.add(config_gui.getName().replace(".yml", ""));
String sub = config_gui.getName().substring(config_gui.getName().length() - 4); String sub = config_gui.getName().substring(config_gui.getName().length() - 4);
if (sub.equals(".yml")) { if (sub.equals(".yml")) {

View File

@ -31,7 +31,7 @@ public class CmdExecuter_Admin implements CommandExecutor, TabCompleter {
if (sender.hasPermission("commandgui.command.info")) { if (sender.hasPermission("commandgui.command.info")) {
Commands.info(sender); Commands.info(sender);
} else sender.sendMessage(SelectMessages.NoPermissionForCommand } else sender.sendMessage(SelectMessages.NoPermissionForCommand
.replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.command.info")); .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.command.info"));
break; break;
case "reload": case "reload":
@ -39,14 +39,14 @@ public class CmdExecuter_Admin implements CommandExecutor, TabCompleter {
if (sender.hasPermission("commandgui.admin")) { if (sender.hasPermission("commandgui.admin")) {
Commands.reload(sender); Commands.reload(sender);
} else sender.sendMessage(SelectMessages.NoPermissionForCommand } else sender.sendMessage(SelectMessages.NoPermissionForCommand
.replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin"));
break; break;
case "createdefaultgui": case "createdefaultgui":
if (sender.hasPermission("commandgui.admin")) { if (sender.hasPermission("commandgui.admin")) {
DefaultGUICreate.configCreate(); DefaultGUICreate.configCreate();
sender.sendMessage(SelectMessages.DefaultGUIcreate.replace("[directory]", Main.getPath() + "/GUIs/default.yml")); sender.sendMessage(SelectMessages.DefaultGUIcreate.replace("[directory]", Main.getPath() + "/GUIs/default.yml"));
} else sender.sendMessage(SelectMessages.NoPermissionForCommand } else sender.sendMessage(SelectMessages.NoPermissionForCommand
.replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin"));
break; break;
case "debug": case "debug":
if (sender.hasPermission("commandgui.admin")) { if (sender.hasPermission("commandgui.admin")) {
@ -63,7 +63,7 @@ public class CmdExecuter_Admin implements CommandExecutor, TabCompleter {
} else Debug.debugmsg(); } 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; break;
case "give": case "give":

View File

@ -39,15 +39,12 @@ public class Commands {
send.player(player, prefix + "§4======= §8[§4Command§9GUI§8] §4======="); send.player(player, prefix + "§4======= §8[§4Command§9GUI§8] §4=======");
send.player(player, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", "")); send.player(player, prefix + " §2Autor: §6" + String.valueOf(autor).replace("[", "").replace("]", ""));
if (UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion.equalsIgnoreCase(version)) { if (UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion.equalsIgnoreCase(version)) {
send.player(player, prefix + " §2Version: §6" + version); send.player(player, prefix + " §2Version: §6" + version);
} else { } else {
UpdateAPI.sendUpdateMsg(prefix,spigot,discord,version,UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion,player); UpdateAPI.sendUpdateMsg(prefix,spigot,discord,version,UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion,player);
} }
send.player(player, prefix + " §2Spigot: §6" + spigot); send.player(player, prefix + " §2Spigot: §6" + spigot);
send.player(player, prefix + " §2Discord: §6" + discord); send.player(player, prefix + " §2Discord: §6" + discord);
send.player(player, prefix + "§4======= §8[§4Command§9GUI§8] §4======="); 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 + " §6Plugin reload...");
send.console(prefix + "§8-------------------------------"); send.console(prefix + "§8-------------------------------");
CmdExecuter_GUI.arg1.clear();
CmdExecuter_GUI.arg1.put("admin", "commandgui.admin;commandgui.giveitem.other;commandgui.command.info");
ConfigCreate.configCreate(); ConfigCreate.configCreate();
SelectConfig.onSelect(); SelectConfig.onSelect();
plugin.reloadConfig(); plugin.reloadConfig();

View File

@ -110,17 +110,7 @@ public class AliasRegister {
org.bukkit.craftbukkit.v1_18_R1.CraftServer craftServer = (org.bukkit.craftbukkit.v1_18_R1.CraftServer) plugin.getServer(); org.bukkit.craftbukkit.v1_18_R1.CraftServer craftServer = (org.bukkit.craftbukkit.v1_18_R1.CraftServer) plugin.getServer();
craftServer.getCommandMap().register(alias, new RegisterCommand(alias)); 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
}
} }
} }
} }
} }

View File

@ -58,7 +58,7 @@ public class CGuiAPI {
if (sender.hasPermission("commandgui.command.info")) { if (sender.hasPermission("commandgui.command.info")) {
Commands.info(sender); Commands.info(sender);
} else sender.sendMessage(SelectMessages.NoPermissionForCommand } 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) { public static void createDefaultGUI(CommandSender sender) {
@ -66,14 +66,14 @@ public class CGuiAPI {
DefaultGUICreate.configCreate(); DefaultGUICreate.configCreate();
sender.sendMessage(SelectMessages.DefaultGUIcreate.replace("[directory]", Main.getPath() + "\\GUIs\\default.yml")); sender.sendMessage(SelectMessages.DefaultGUIcreate.replace("[directory]", Main.getPath() + "\\GUIs\\default.yml"));
} else sender.sendMessage(SelectMessages.NoPermissionForCommand } 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) { public static void reload(CommandSender sender) {
if (sender.hasPermission("commandgui.admin")) { if (sender.hasPermission("commandgui.admin")) {
Commands.reload(sender); Commands.reload(sender);
} else sender.sendMessage(SelectMessages.NoPermissionForCommand } else sender.sendMessage(SelectMessages.NoPermissionForCommand
.replace("[cmd]", "/commandguiadmin").replace("[perm]", "commandgui.admin")); .replace("[cmd]", "/commandgui admin").replace("[perm]", "commandgui.admin"));
} }

View File

@ -1,4 +1,5 @@
MySQL: MySQL:
Enable: false
IP: localhost IP: localhost
Port: 3306 Port: 3306
Database: database Database: database