diff --git a/pom.xml b/pom.xml index e741e9c..042c656 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.t2code Alias - 1.0.5 + 1.0.6-Snapshot jar T2C-Alias diff --git a/src/main/java/net/t2code/alias/Spigot/Main.java b/src/main/java/net/t2code/alias/Spigot/Main.java index f5a4f3b..575b834 100644 --- a/src/main/java/net/t2code/alias/Spigot/Main.java +++ b/src/main/java/net/t2code/alias/Spigot/Main.java @@ -43,12 +43,6 @@ public final class Main extends JavaPlugin { Load.onLoad(prefix, autor, version, spigot, spigotID, discord, bstatsID); } - - public void saveConfig() { - if (!new File(getPath(), "config.yml").exists()) - plugin.saveResource("config.yml", false); - } - @Override public void onDisable() { // Plugin shutdown logic diff --git a/src/main/java/net/t2code/alias/Spigot/cmdManagement/Alias_CmdExecuter.java b/src/main/java/net/t2code/alias/Spigot/cmdManagement/Alias_CmdExecuter.java index d0b15d3..0add805 100644 --- a/src/main/java/net/t2code/alias/Spigot/cmdManagement/Alias_CmdExecuter.java +++ b/src/main/java/net/t2code/alias/Spigot/cmdManagement/Alias_CmdExecuter.java @@ -38,7 +38,7 @@ public class Alias_CmdExecuter implements CommandExecutor, TabCompleter { break; case "info": case "plugin": - case "veraion": + case "version": if (sender.hasPermission("t2code.alias.command.info")) { Commands.info(sender); } else send.sender(sender, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/t2code-alias info") diff --git a/src/main/java/net/t2code/alias/Spigot/config/config/SelectAlias.java b/src/main/java/net/t2code/alias/Spigot/config/config/SelectAlias.java index 0280c59..646eb72 100644 --- a/src/main/java/net/t2code/alias/Spigot/config/config/SelectAlias.java +++ b/src/main/java/net/t2code/alias/Spigot/config/config/SelectAlias.java @@ -15,11 +15,10 @@ public class SelectAlias { Main.allAliases.clear(); File f = new File(Main.getPath() + "/Alias/"); 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")) { + Main.allAliases.add(config_gui.getName().replace(".yml", "")); YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config_gui); Alias_Objekt alias = new Alias_Objekt( diff --git a/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java b/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java index 22a46bf..35785af 100644 --- a/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java +++ b/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java @@ -98,7 +98,7 @@ public class AliasRegister { craftServer.getCommandMap().register(alias, new RegisterCommands(alias)); } } - } else send.warning(plugin, " §4AliasHashmap is null!"); + } else send.warning(plugin, " §4AliasHashmap is null! - " + alias); } } } diff --git a/src/main/java/net/t2code/alias/Spigot/system/Alias_RegisterPermissions.java b/src/main/java/net/t2code/alias/Spigot/system/Alias_RegisterPermissions.java index f67cd3a..b87dcb1 100644 --- a/src/main/java/net/t2code/alias/Spigot/system/Alias_RegisterPermissions.java +++ b/src/main/java/net/t2code/alias/Spigot/system/Alias_RegisterPermissions.java @@ -12,10 +12,6 @@ public class Alias_RegisterPermissions { if (Bukkit.getPluginManager().getPermission("t2code.alias.use." + alias.toLowerCase()) == null) { Register.permission("t2code.alias.use." + alias.toLowerCase(), Main.plugin); } - - //if (Bukkit.getPluginManager().getPermission(Main.aliasHashMap.get(alias).AdminPermission) == null){ - // Bukkit.getPluginManager().addPermission(new Permission(Main.aliasHashMap.get(alias).AdminPermission)); - //} } } } \ No newline at end of file diff --git a/src/main/java/net/t2code/alias/Spigot/system/Load.java b/src/main/java/net/t2code/alias/Spigot/system/Load.java index 1fa2fd5..12468a5 100644 --- a/src/main/java/net/t2code/alias/Spigot/system/Load.java +++ b/src/main/java/net/t2code/alias/Spigot/system/Load.java @@ -21,7 +21,7 @@ public class Load { static Plugin plugin = Main.plugin; public static void onLoad(String prefix, List autor, String version, String spigot, int spigotID, String discord, int bstatsID) { Long long_ = T2CodeTemplate.onLoadHeader(prefix, autor, version, spigot, discord); - Main.plugin.getCommand("alias").setExecutor(new Alias_CmdExecuter()); + Main.plugin.getCommand("t2code-alias").setExecutor(new Alias_CmdExecuter()); loadReload(); UpdateAPI.onUpdateCheck(plugin, prefix, spigot, spigotID, discord); Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);