1.0.6 #1
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>Alias</artifactId>
|
<artifactId>Alias</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.0.6-Snapshot</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2C-Alias</name>
|
<name>T2C-Alias</name>
|
||||||
|
@ -43,12 +43,6 @@ public final class Main extends JavaPlugin {
|
|||||||
Load.onLoad(prefix, autor, version, spigot, spigotID, discord, bstatsID);
|
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
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
// Plugin shutdown logic
|
// Plugin shutdown logic
|
||||||
|
@ -38,7 +38,7 @@ public class Alias_CmdExecuter implements CommandExecutor, TabCompleter {
|
|||||||
break;
|
break;
|
||||||
case "info":
|
case "info":
|
||||||
case "plugin":
|
case "plugin":
|
||||||
case "veraion":
|
case "version":
|
||||||
if (sender.hasPermission("t2code.alias.command.info")) {
|
if (sender.hasPermission("t2code.alias.command.info")) {
|
||||||
Commands.info(sender);
|
Commands.info(sender);
|
||||||
} else send.sender(sender, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/t2code-alias info")
|
} else send.sender(sender, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/t2code-alias info")
|
||||||
|
@ -15,11 +15,10 @@ public class SelectAlias {
|
|||||||
Main.allAliases.clear();
|
Main.allAliases.clear();
|
||||||
File f = new File(Main.getPath() + "/Alias/");
|
File f = new File(Main.getPath() + "/Alias/");
|
||||||
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", ""));
|
|
||||||
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")) {
|
||||||
|
Main.allAliases.add(config_gui.getName().replace(".yml", ""));
|
||||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config_gui);
|
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config_gui);
|
||||||
|
|
||||||
Alias_Objekt alias = new Alias_Objekt(
|
Alias_Objekt alias = new Alias_Objekt(
|
||||||
|
@ -98,7 +98,7 @@ public class AliasRegister {
|
|||||||
craftServer.getCommandMap().register(alias, new RegisterCommands(alias));
|
craftServer.getCommandMap().register(alias, new RegisterCommands(alias));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else send.warning(plugin, " §4AliasHashmap is null!");
|
} else send.warning(plugin, " §4AliasHashmap is null! - " + alias);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,6 @@ public class Alias_RegisterPermissions {
|
|||||||
if (Bukkit.getPluginManager().getPermission("t2code.alias.use." + alias.toLowerCase()) == null) {
|
if (Bukkit.getPluginManager().getPermission("t2code.alias.use." + alias.toLowerCase()) == null) {
|
||||||
Register.permission("t2code.alias.use." + alias.toLowerCase(), Main.plugin);
|
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));
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -21,7 +21,7 @@ public class Load {
|
|||||||
static Plugin plugin = Main.plugin;
|
static Plugin plugin = Main.plugin;
|
||||||
public static void onLoad(String prefix, List autor, String version, String spigot, int spigotID, String discord, int bstatsID) {
|
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);
|
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();
|
loadReload();
|
||||||
UpdateAPI.onUpdateCheck(plugin, prefix, spigot, spigotID, discord);
|
UpdateAPI.onUpdateCheck(plugin, prefix, spigot, spigotID, discord);
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);
|
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user