1.0.8-sn-b2
This commit is contained in:
parent
857c87ea9b
commit
618748a5f2
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>AliasBungee</artifactId>
|
<artifactId>AliasBungee</artifactId>
|
||||||
<version>1.0.6</version>
|
<version>1.0.8-Snapshot-B2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2C-AliasBungee</name>
|
<name>T2C-AliasBungee</name>
|
||||||
|
@ -2,7 +2,7 @@ package net.t2code.alias.Bungee;
|
|||||||
|
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
import net.md_5.bungee.api.plugin.Plugin;
|
||||||
import net.t2code.alias.Bungee.objects.Alias_Objekt;
|
import net.t2code.alias.Bungee.objects.AliasObjekt;
|
||||||
import net.t2code.alias.Bungee.system.Load;
|
import net.t2code.alias.Bungee.system.Load;
|
||||||
import net.t2code.alias.Util;
|
import net.t2code.alias.Util;
|
||||||
import net.t2code.lib.Bungee.Lib.messages.BT2CodeTemplate;
|
import net.t2code.lib.Bungee.Lib.messages.BT2CodeTemplate;
|
||||||
@ -30,7 +30,7 @@ public final class Main extends Plugin {
|
|||||||
|
|
||||||
public static Main plugin;
|
public static Main plugin;
|
||||||
|
|
||||||
public static HashMap<String, Alias_Objekt> aliasHashMap = new HashMap<>();
|
public static HashMap<String, AliasObjekt> aliasHashMap = new HashMap<>();
|
||||||
public static ArrayList<String> allAliases = new ArrayList<>();
|
public static ArrayList<String> allAliases = new ArrayList<>();
|
||||||
|
|
||||||
private static Boolean enable= false;
|
private static Boolean enable= false;
|
||||||
|
@ -26,7 +26,7 @@ public class Alias_CmdExecuter extends Command implements TabExecutor {
|
|||||||
// Command
|
// Command
|
||||||
if (sender.hasPermission("t2code.alias.command.info")) {
|
if (sender.hasPermission("t2code.alias.command.info")) {
|
||||||
Commands.info(sender);
|
Commands.info(sender);
|
||||||
} else Bsend.sender(sender, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/t2code-alias info")
|
} else Bsend.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias info")
|
||||||
.replace("[perm]", "t2code.alias.command.info"));
|
.replace("[perm]", "t2code.alias.command.info"));
|
||||||
} else {
|
} else {
|
||||||
switch (args[0].toLowerCase()) {
|
switch (args[0].toLowerCase()) {
|
||||||
@ -34,7 +34,7 @@ public class Alias_CmdExecuter extends Command implements TabExecutor {
|
|||||||
case "rl":
|
case "rl":
|
||||||
if (sender.hasPermission("t2code.alias.command.reload")) {
|
if (sender.hasPermission("t2code.alias.command.reload")) {
|
||||||
Commands.reload(sender);
|
Commands.reload(sender);
|
||||||
} else Bsend.sender(sender, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/t2code-alias reload")
|
} else Bsend.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias reload")
|
||||||
.replace("[perm]", "t2code.alias.command.reload"));
|
.replace("[perm]", "t2code.alias.command.reload"));
|
||||||
break;
|
break;
|
||||||
case "info":
|
case "info":
|
||||||
@ -42,7 +42,7 @@ public class Alias_CmdExecuter extends Command implements TabExecutor {
|
|||||||
case "version":
|
case "version":
|
||||||
if (sender.hasPermission("t2code.alias.command.info")) {
|
if (sender.hasPermission("t2code.alias.command.info")) {
|
||||||
Commands.info(sender);
|
Commands.info(sender);
|
||||||
} else Bsend.sender(sender, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/t2code-alias info")
|
} else Bsend.sender(sender, SelectMessages.noPermissionForCommand.replace("[cmd]", "/t2code-alias info")
|
||||||
.replace("[perm]", "t2code.alias.command.info"));
|
.replace("[perm]", "t2code.alias.command.info"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,12 @@ public class Commands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void reload(CommandSender sender) {
|
public static void reload(CommandSender sender) {
|
||||||
if (sender instanceof ProxiedPlayer) sender.sendMessage(SelectMessages.ReloadStart);
|
if (sender instanceof ProxiedPlayer) sender.sendMessage(SelectMessages.reloadStart);
|
||||||
Bsend.console(Main.prefix + "§8-------------------------------");
|
Bsend.console(Main.prefix + "§8-------------------------------");
|
||||||
Bsend.console(Main.prefix + " §6Plugin reload...");
|
Bsend.console(Main.prefix + " §6Plugin reload...");
|
||||||
Bsend.console(Main.prefix + "§8-------------------------------");
|
Bsend.console(Main.prefix + "§8-------------------------------");
|
||||||
Load.loadReload();
|
Load.loadReload();
|
||||||
if (sender instanceof ProxiedPlayer) sender.sendMessage(SelectMessages.ReloadEnd);
|
if (sender instanceof ProxiedPlayer) sender.sendMessage(SelectMessages.reloadEnd);
|
||||||
Bsend.console(Main.prefix + "§8-------------------------------");
|
Bsend.console(Main.prefix + "§8-------------------------------");
|
||||||
Bsend.console(Main.prefix + " §2Plugin successfully reloaded.");
|
Bsend.console(Main.prefix + " §2Plugin successfully reloaded.");
|
||||||
Bsend.console(Main.prefix + "§8-------------------------------");
|
Bsend.console(Main.prefix + "§8-------------------------------");
|
||||||
|
@ -6,7 +6,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|||||||
import net.md_5.bungee.api.plugin.Command;
|
import net.md_5.bungee.api.plugin.Command;
|
||||||
import net.t2code.alias.Bungee.Main;
|
import net.t2code.alias.Bungee.Main;
|
||||||
import net.t2code.alias.Bungee.config.languages.SelectMessages;
|
import net.t2code.alias.Bungee.config.languages.SelectMessages;
|
||||||
import net.t2code.alias.Bungee.objects.Alias_Objekt;
|
import net.t2code.alias.Bungee.objects.AliasObjekt;
|
||||||
import net.t2code.lib.Bungee.Lib.commands.Bcmd;
|
import net.t2code.lib.Bungee.Lib.commands.Bcmd;
|
||||||
import net.t2code.lib.Bungee.Lib.messages.Bsend;
|
import net.t2code.lib.Bungee.Lib.messages.Bsend;
|
||||||
import net.t2code.lib.Bungee.Lib.replace.BReplace;
|
import net.t2code.lib.Bungee.Lib.replace.BReplace;
|
||||||
@ -23,35 +23,44 @@ public class RegisterCommands extends Command {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
Alias_Objekt Alias = Main.aliasHashMap.get(alias);
|
AliasObjekt Alias = Main.aliasHashMap.get(alias);
|
||||||
|
|
||||||
if (!Alias.AliasEnable) {
|
if (!Alias.aliasEnable) {
|
||||||
Bsend.sender(sender, SelectMessages.AliasDisabled);
|
Bsend.sender(sender, SelectMessages.aliasDisabled);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sender instanceof ProxiedPlayer) {
|
if (sender instanceof ProxiedPlayer) {
|
||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
|
|
||||||
if (Alias.AdminEnable) {
|
if (Alias.serverProtectionEnable) {
|
||||||
if (player.hasPermission(Alias.AdminPermission)) {
|
if (Alias.serverProtectionMode.equalsIgnoreCase("blacklist") && Alias.serverProtectionList.contains(player.getServer().getInfo().getName())) {
|
||||||
if (Alias.AdminCommandEnable) {
|
return;
|
||||||
for (String cmd : Alias.AdminCommands) {
|
}
|
||||||
if (Alias.AdminCommandAsConsole) {
|
if (Alias.serverProtectionMode.equalsIgnoreCase("whitelist") && !Alias.serverProtectionList.contains(player.getServer().getInfo().getName())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Alias.adminEnable) {
|
||||||
|
if (player.hasPermission(Alias.adminPermission)) {
|
||||||
|
if (Alias.adminCommandEnable) {
|
||||||
|
for (String cmd : Alias.adminCommands) {
|
||||||
|
if (Alias.adminCommandAsConsole) {
|
||||||
Bcmd.Console(cmd.replace("[player]", player.getName()));
|
Bcmd.Console(cmd.replace("[player]", player.getName()));
|
||||||
} else {
|
} else {
|
||||||
Bcmd.Player(player, cmd.replace("[player]", player.getName()));
|
Bcmd.Player(player, cmd.replace("[player]", player.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Alias.AdminMessageEnable) {
|
if (Alias.adminMessageEnable) {
|
||||||
for (String msg : Alias.AdminMessages) {
|
for (String msg : Alias.adminMessages) {
|
||||||
String text = BReplace.replace(prefix, msg);
|
String text = BReplace.replace(prefix, msg);
|
||||||
String hover = BReplace.replace(prefix, Alias.AdminHover);
|
String hover = BReplace.replace(prefix, Alias.adminHover);
|
||||||
if (Alias.AdminTextBuilder) {
|
if (Alias.adminTextBuilder) {
|
||||||
TextBuilder textBuilder = new TextBuilder(text);
|
TextBuilder textBuilder = new TextBuilder(text);
|
||||||
textBuilder.addHover(hover);
|
textBuilder.addHover(hover);
|
||||||
if (Alias.AdminClickEvent) {
|
if (Alias.adminClickEvent) {
|
||||||
textBuilder.addClickEvent(ClickEvent.Action.valueOf(Alias.AdminAction), Alias.AdminActionValue);
|
textBuilder.addClickEvent(ClickEvent.Action.valueOf(Alias.adminAction), Alias.adminActionValue);
|
||||||
}
|
}
|
||||||
player.sendMessage(textBuilder.build());
|
player.sendMessage(textBuilder.build());
|
||||||
} else {
|
} else {
|
||||||
@ -62,31 +71,31 @@ public class RegisterCommands extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Alias.Perm_necessary) {
|
if (Alias.permNecessary) {
|
||||||
if (!(player.hasPermission("t2code.alias.use." + alias.toLowerCase()) || player.hasPermission("t2code.alias.admin"))) {
|
if (!(player.hasPermission("t2code.alias.use." + alias.toLowerCase()) || player.hasPermission("t2code.alias.admin"))) {
|
||||||
Bsend.player(player, SelectMessages.NoPermissionForCommand.replace("[cmd]", "/" + alias.toLowerCase())
|
Bsend.player(player, SelectMessages.noPermissionForCommand.replace("[cmd]", "/" + alias.toLowerCase())
|
||||||
.replace("[perm]", "t2code.alias.use." + alias.toLowerCase()));
|
.replace("[perm]", "t2code.alias.use." + alias.toLowerCase()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Alias.Command_Enable) {
|
if (Alias.command_Enable) {
|
||||||
for (String cmd : Alias.Command) {
|
for (String cmd : Alias.command) {
|
||||||
if (Alias.CommandAsConsole) {
|
if (Alias.commandAsConsole) {
|
||||||
Bcmd.Console(cmd.replace("[player]", player.getName()));
|
Bcmd.Console(cmd.replace("[player]", player.getName()));
|
||||||
} else {
|
} else {
|
||||||
Bcmd.Player(player, cmd.replace("[player]", player.getName()));
|
Bcmd.Player(player, cmd.replace("[player]", player.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Alias.Message_Enable) {
|
if (Alias.messageEnable) {
|
||||||
for (String msg : Alias.Messages) {
|
for (String msg : Alias.messages) {
|
||||||
String text = BReplace.replace(prefix, msg);
|
String text = BReplace.replace(prefix, msg);
|
||||||
String hover = BReplace.replace(prefix, Alias.Hover);
|
String hover = BReplace.replace(prefix, Alias.hover);
|
||||||
if (Alias.TextBuilder) {
|
if (Alias.textBuilder) {
|
||||||
TextBuilder textBuilder = new TextBuilder(text);
|
TextBuilder textBuilder = new TextBuilder(text);
|
||||||
textBuilder.addHover(hover);
|
textBuilder.addHover(hover);
|
||||||
if (Alias.ClickEvent) {
|
if (Alias.clickEvent) {
|
||||||
textBuilder.addClickEvent(ClickEvent.Action.valueOf(Alias.Action), Alias.ActionValue);
|
textBuilder.addClickEvent(ClickEvent.Action.valueOf(Alias.action), Alias.actionValue);
|
||||||
}
|
}
|
||||||
player.sendMessage(textBuilder.build());
|
player.sendMessage(textBuilder.build());
|
||||||
} else {
|
} else {
|
||||||
@ -95,18 +104,18 @@ public class RegisterCommands extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Alias.ConsoleEnable) {
|
if (Alias.consoleEnable) {
|
||||||
if (Alias.ConsoleCommandEnable) {
|
if (Alias.consoleCommandEnable) {
|
||||||
for (String cmd : Alias.ConsoleCommands) {
|
for (String cmd : Alias.consoleCommands) {
|
||||||
Bcmd.Console(cmd.replace("[player]", sender.getName()));
|
Bcmd.Console(cmd.replace("[player]", sender.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Alias.ConsoleMessageEnable) {
|
if (Alias.consoleMessageEnable) {
|
||||||
for (String msg : Alias.ConsoleMessages) {
|
for (String msg : Alias.consoleMessages) {
|
||||||
Bsend.console(BReplace.replace(prefix, msg));
|
Bsend.console(BReplace.replace(prefix, msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else Bsend.sender(sender, SelectMessages.OnlyForPlayer);
|
} else Bsend.sender(sender, SelectMessages.onlyForPlayer);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,10 @@ public class CreateExampleAliasConfig {
|
|||||||
BConfig.set("Alias.Enable", Enable, configuration);
|
BConfig.set("Alias.Enable", Enable, configuration);
|
||||||
BConfig.set("Alias.Permission.Necessary", PermNecessary, configuration);
|
BConfig.set("Alias.Permission.Necessary", PermNecessary, configuration);
|
||||||
|
|
||||||
|
BConfig.set("Alias.Protection.Server.Enable", false, configuration);
|
||||||
|
BConfig.set("Alias.Protection.Server.Mode", "blacklist", configuration);
|
||||||
|
BConfig.set("Alias.Protection.Server.List", Arrays.asList("Server1", "Server2"), configuration);
|
||||||
|
|
||||||
BConfig.set("Alias.Command.Enable", CommandEnable, configuration);
|
BConfig.set("Alias.Command.Enable", CommandEnable, configuration);
|
||||||
BConfig.set("Alias.Command.CommandAsConsole", CommandAsConsole, configuration);
|
BConfig.set("Alias.Command.CommandAsConsole", CommandAsConsole, configuration);
|
||||||
BConfig.set("Alias.Command.Commands", Commands, configuration);
|
BConfig.set("Alias.Command.Commands", Commands, configuration);
|
||||||
@ -80,7 +84,6 @@ public class CreateExampleAliasConfig {
|
|||||||
BConfig.set("Alias.Message.TextBuilder.ClickEvent.Action", Action, configuration);
|
BConfig.set("Alias.Message.TextBuilder.ClickEvent.Action", Action, configuration);
|
||||||
BConfig.set("Alias.Message.TextBuilder.ClickEvent.ActionValue", ActionValue, configuration);
|
BConfig.set("Alias.Message.TextBuilder.ClickEvent.ActionValue", ActionValue, configuration);
|
||||||
|
|
||||||
|
|
||||||
BConfig.set("Alias.Admin.Enable", AdminEnable, configuration);
|
BConfig.set("Alias.Admin.Enable", AdminEnable, configuration);
|
||||||
BConfig.set("Alias.Admin.Permission", AdminPermission, configuration);
|
BConfig.set("Alias.Admin.Permission", AdminPermission, configuration);
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import net.md_5.bungee.config.ConfigurationProvider;
|
|||||||
import net.md_5.bungee.config.YamlConfiguration;
|
import net.md_5.bungee.config.YamlConfiguration;
|
||||||
import net.t2code.alias.Bungee.Main;
|
import net.t2code.alias.Bungee.Main;
|
||||||
import net.t2code.alias.Bungee.system.AliasRegister;
|
import net.t2code.alias.Bungee.system.AliasRegister;
|
||||||
import net.t2code.alias.Bungee.objects.Alias_Objekt;
|
import net.t2code.alias.Bungee.objects.AliasObjekt;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -24,10 +24,14 @@ public class SelectAlias {
|
|||||||
if (sub.equals(".yml")) {
|
if (sub.equals(".yml")) {
|
||||||
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(config_gui);
|
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(config_gui);
|
||||||
|
|
||||||
Alias_Objekt alias = new Alias_Objekt(
|
AliasObjekt alias = new AliasObjekt(
|
||||||
configuration.getBoolean("Alias.Enable"),
|
configuration.getBoolean("Alias.Enable"),
|
||||||
configuration.getBoolean("Alias.Permission.Necessary"),
|
configuration.getBoolean("Alias.Permission.Necessary"),
|
||||||
|
|
||||||
|
configuration.getBoolean("Alias.Protection.Server.Enable"),
|
||||||
|
configuration.getString("Alias.Protection.Server.Mode"),
|
||||||
|
configuration.getStringList("Alias.Protection.Server.List"),
|
||||||
|
|
||||||
configuration.getBoolean("Alias.Command.Enable"),
|
configuration.getBoolean("Alias.Command.Enable"),
|
||||||
configuration.getBoolean("Alias.Command.CommandAsConsole"),
|
configuration.getBoolean("Alias.Command.CommandAsConsole"),
|
||||||
configuration.getStringList("Alias.Command.Commands"),
|
configuration.getStringList("Alias.Command.Commands"),
|
||||||
|
@ -5,6 +5,7 @@ import net.md_5.bungee.config.ConfigurationProvider;
|
|||||||
import net.md_5.bungee.config.YamlConfiguration;
|
import net.md_5.bungee.config.YamlConfiguration;
|
||||||
import net.t2code.alias.Bungee.Main;
|
import net.t2code.alias.Bungee.Main;
|
||||||
import net.t2code.alias.Bungee.config.config.SelectConfig;
|
import net.t2code.alias.Bungee.config.config.SelectConfig;
|
||||||
|
import net.t2code.alias.Util;
|
||||||
import net.t2code.lib.Bungee.Lib.messages.Bsend;
|
import net.t2code.lib.Bungee.Lib.messages.Bsend;
|
||||||
import net.t2code.lib.Bungee.Lib.yamlConfiguration.BConfig;
|
import net.t2code.lib.Bungee.Lib.yamlConfiguration.BConfig;
|
||||||
|
|
||||||
@ -12,16 +13,17 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class SelectMessages {
|
public class SelectMessages {
|
||||||
private static String prefix = Main.prefix;
|
|
||||||
|
private static String prefix = Util.getPrefix();
|
||||||
|
|
||||||
public static String selectMSG;
|
public static String selectMSG;
|
||||||
|
|
||||||
public static String OnlyForPlayer;
|
public static String onlyForPlayer;
|
||||||
public static String ReloadStart;
|
public static String reloadStart;
|
||||||
public static String ReloadEnd;
|
public static String reloadEnd;
|
||||||
|
|
||||||
public static String NoPermissionForCommand;
|
public static String noPermissionForCommand;
|
||||||
public static String AliasDisabled;
|
public static String aliasDisabled;
|
||||||
|
|
||||||
|
|
||||||
public static void onSelect(String Prefix)throws IOException {
|
public static void onSelect(String Prefix)throws IOException {
|
||||||
@ -40,11 +42,11 @@ public class SelectMessages {
|
|||||||
} else selectMSG = SelectConfig.language;
|
} else selectMSG = SelectConfig.language;
|
||||||
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(msg);
|
Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(msg);
|
||||||
|
|
||||||
OnlyForPlayer = BConfig.select(prefix, "Plugin.OnlyForPlayer", configuration);
|
onlyForPlayer = BConfig.select(prefix, "Plugin.OnlyForPlayer", configuration);
|
||||||
AliasDisabled = BConfig.select(prefix, "Plugin.AliasDisabled", configuration);
|
aliasDisabled = BConfig.select(prefix, "Plugin.AliasDisabled", configuration);
|
||||||
ReloadStart = BConfig.select(prefix, "Plugin.Reload.Start", configuration);
|
reloadStart = BConfig.select(prefix, "Plugin.Reload.Start", configuration);
|
||||||
ReloadEnd = BConfig.select(prefix, "Plugin.Reload.End", configuration);
|
reloadEnd = BConfig.select(prefix, "Plugin.Reload.End", configuration);
|
||||||
NoPermissionForCommand = BConfig.select(prefix, "Plugin.ForCommand", configuration);
|
noPermissionForCommand = BConfig.select(prefix, "Plugin.ForCommand", configuration);
|
||||||
|
|
||||||
Bsend.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
Bsend.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||||
}
|
}
|
||||||
|
115
src/main/java/net/t2code/alias/Bungee/objects/AliasObjekt.java
Normal file
115
src/main/java/net/t2code/alias/Bungee/objects/AliasObjekt.java
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
package net.t2code.alias.Bungee.objects;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AliasObjekt {
|
||||||
|
public Boolean aliasEnable;
|
||||||
|
public Boolean permNecessary;
|
||||||
|
|
||||||
|
public Boolean serverProtectionEnable;
|
||||||
|
public String serverProtectionMode;
|
||||||
|
public List<String> serverProtectionList;
|
||||||
|
|
||||||
|
public Boolean command_Enable;
|
||||||
|
public Boolean commandAsConsole;
|
||||||
|
public List<String> command;
|
||||||
|
public Boolean messageEnable;
|
||||||
|
public List<String> messages;
|
||||||
|
public Boolean textBuilder;
|
||||||
|
public String hover;
|
||||||
|
public Boolean clickEvent;
|
||||||
|
public String action;
|
||||||
|
public String actionValue;
|
||||||
|
|
||||||
|
public Boolean adminEnable;
|
||||||
|
public String adminPermission;
|
||||||
|
public Boolean adminCommandEnable;
|
||||||
|
public Boolean adminCommandAsConsole;
|
||||||
|
public List<String> adminCommands;
|
||||||
|
public Boolean adminMessageEnable;
|
||||||
|
public List<String> adminMessages;
|
||||||
|
public Boolean adminTextBuilder;
|
||||||
|
public String adminHover;
|
||||||
|
public Boolean adminClickEvent;
|
||||||
|
public String adminAction;
|
||||||
|
public String adminActionValue;
|
||||||
|
public Boolean consoleEnable;
|
||||||
|
public Boolean consoleCommandEnable;
|
||||||
|
public List<String> consoleCommands;
|
||||||
|
public Boolean consoleMessageEnable;
|
||||||
|
public List<String> consoleMessages;
|
||||||
|
|
||||||
|
public AliasObjekt(Boolean aliasEnable,
|
||||||
|
Boolean permNecessary,
|
||||||
|
|
||||||
|
Boolean serverProtectionEnable,
|
||||||
|
String serverProtectionMode,
|
||||||
|
List<String> serverProtectionList,
|
||||||
|
|
||||||
|
Boolean commandEnable,
|
||||||
|
Boolean commandAsConsole,
|
||||||
|
List<String> command,
|
||||||
|
Boolean message_Enable,
|
||||||
|
List<String> messages,
|
||||||
|
Boolean textBuilder,
|
||||||
|
String hover,
|
||||||
|
Boolean clickEvent,
|
||||||
|
String action,
|
||||||
|
String actionValue,
|
||||||
|
|
||||||
|
Boolean adminEnable,
|
||||||
|
String adminPermission,
|
||||||
|
Boolean adminCommandEnable,
|
||||||
|
Boolean adminCommandAsConsole,
|
||||||
|
List<String> adminCommands,
|
||||||
|
Boolean adminMessageEnable,
|
||||||
|
List<String> adminMessages,
|
||||||
|
Boolean adminTextBuilder,
|
||||||
|
String adminHover,
|
||||||
|
Boolean adminClickEvent,
|
||||||
|
String adminAction,
|
||||||
|
String adminActionValue,
|
||||||
|
|
||||||
|
Boolean consoleEnable,
|
||||||
|
Boolean consoleCommandEnable,
|
||||||
|
List<String> consoleCommands,
|
||||||
|
Boolean consoleMessageEnable,
|
||||||
|
List<String> consoleMessages) {
|
||||||
|
this.aliasEnable = aliasEnable;
|
||||||
|
this.permNecessary = permNecessary;
|
||||||
|
|
||||||
|
this.serverProtectionEnable = serverProtectionEnable;
|
||||||
|
this.serverProtectionMode = serverProtectionMode;
|
||||||
|
this.serverProtectionList = serverProtectionList;
|
||||||
|
|
||||||
|
this.command_Enable = commandEnable;
|
||||||
|
this.commandAsConsole = commandAsConsole;
|
||||||
|
this.command = command;
|
||||||
|
this.messageEnable = message_Enable;
|
||||||
|
this.messages = messages;
|
||||||
|
this.textBuilder = textBuilder;
|
||||||
|
this.hover = hover;
|
||||||
|
this.clickEvent = clickEvent;
|
||||||
|
this.action = action;
|
||||||
|
this.actionValue = actionValue;
|
||||||
|
this.adminEnable = adminEnable;
|
||||||
|
this.adminPermission = adminPermission;
|
||||||
|
this.adminCommandEnable = adminCommandEnable;
|
||||||
|
this.adminCommandAsConsole = adminCommandAsConsole;
|
||||||
|
this.adminCommands = adminCommands;
|
||||||
|
this.adminMessageEnable = adminMessageEnable;
|
||||||
|
this.adminMessages = adminMessages;
|
||||||
|
this.adminTextBuilder = adminTextBuilder;
|
||||||
|
this.adminHover = adminHover;
|
||||||
|
this.adminClickEvent = adminClickEvent;
|
||||||
|
this.adminAction = adminAction;
|
||||||
|
this.adminActionValue = adminActionValue;
|
||||||
|
|
||||||
|
this.consoleEnable = consoleEnable;
|
||||||
|
this.consoleCommandEnable = consoleCommandEnable;
|
||||||
|
this.consoleCommands = consoleCommands;
|
||||||
|
this.consoleMessageEnable = consoleMessageEnable;
|
||||||
|
this.consoleMessages = consoleMessages;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,103 +0,0 @@
|
|||||||
package net.t2code.alias.Bungee.objects;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class Alias_Objekt {
|
|
||||||
public Boolean AliasEnable;
|
|
||||||
public Boolean Command_Enable;
|
|
||||||
public Boolean Perm_necessary;
|
|
||||||
|
|
||||||
public Boolean CommandAsConsole;
|
|
||||||
public List<String> Command;
|
|
||||||
public Boolean Message_Enable;
|
|
||||||
public List<String> Messages;
|
|
||||||
public Boolean TextBuilder;
|
|
||||||
public String Hover;
|
|
||||||
public Boolean ClickEvent;
|
|
||||||
public String Action;
|
|
||||||
public String ActionValue;
|
|
||||||
|
|
||||||
public Boolean AdminEnable;
|
|
||||||
public String AdminPermission;
|
|
||||||
public Boolean AdminCommandEnable;
|
|
||||||
public Boolean AdminCommandAsConsole;
|
|
||||||
public List<String> AdminCommands;
|
|
||||||
public Boolean AdminMessageEnable;
|
|
||||||
public List<String> AdminMessages;
|
|
||||||
public Boolean AdminTextBuilder;
|
|
||||||
public String AdminHover;
|
|
||||||
public Boolean AdminClickEvent;
|
|
||||||
public String AdminAction;
|
|
||||||
public String AdminActionValue;
|
|
||||||
public Boolean ConsoleEnable;
|
|
||||||
public Boolean ConsoleCommandEnable;
|
|
||||||
public List<String> ConsoleCommands;
|
|
||||||
public Boolean ConsoleMessageEnable;
|
|
||||||
public List<String> ConsoleMessages;
|
|
||||||
|
|
||||||
public Alias_Objekt(Boolean AliasEnable,
|
|
||||||
Boolean Perm_necessary,
|
|
||||||
|
|
||||||
Boolean Command_Enable,
|
|
||||||
Boolean CommandAsConsole,
|
|
||||||
List Command,
|
|
||||||
Boolean Message_Enable,
|
|
||||||
List Messages,
|
|
||||||
Boolean TextBuilder,
|
|
||||||
String Hover,
|
|
||||||
Boolean ClickEvent,
|
|
||||||
String Action,
|
|
||||||
String ActionValue,
|
|
||||||
|
|
||||||
Boolean AdminEnable,
|
|
||||||
String AdminPermission,
|
|
||||||
Boolean AdminCommandEnable,
|
|
||||||
Boolean AdminCommandAsConsole,
|
|
||||||
List AdminCommands,
|
|
||||||
Boolean AdminMessageEnable,
|
|
||||||
List AdminMessages,
|
|
||||||
Boolean AdminTextBuilder,
|
|
||||||
String AdminHover,
|
|
||||||
Boolean AdminClickEvent,
|
|
||||||
String AdminAction,
|
|
||||||
String AdminActionValue,
|
|
||||||
|
|
||||||
Boolean ConsoleEnable,
|
|
||||||
Boolean ConsoleCommandEnable,
|
|
||||||
List<String> ConsoleCommands,
|
|
||||||
Boolean ConsoleMessageEnable,
|
|
||||||
List<String> ConsoleMessages) {
|
|
||||||
this.AliasEnable = AliasEnable;
|
|
||||||
this.Perm_necessary = Perm_necessary;
|
|
||||||
|
|
||||||
this.Command_Enable = Command_Enable;
|
|
||||||
this.CommandAsConsole = CommandAsConsole;
|
|
||||||
this.Command = Command;
|
|
||||||
this.Message_Enable = Message_Enable;
|
|
||||||
this.Messages = Messages;
|
|
||||||
this.TextBuilder = TextBuilder;
|
|
||||||
this.Hover = Hover;
|
|
||||||
this.ClickEvent = ClickEvent;
|
|
||||||
this.Action = Action;
|
|
||||||
this.ActionValue = ActionValue;
|
|
||||||
this.AdminEnable = AdminEnable;
|
|
||||||
this.AdminPermission = AdminPermission;
|
|
||||||
this.AdminCommandEnable = AdminCommandEnable;
|
|
||||||
this.AdminCommandAsConsole = AdminCommandAsConsole;
|
|
||||||
this.AdminCommands = AdminCommands;
|
|
||||||
this.AdminMessageEnable = AdminMessageEnable;
|
|
||||||
this.AdminMessages = AdminMessages;
|
|
||||||
this.AdminTextBuilder = AdminTextBuilder;
|
|
||||||
this.AdminHover = AdminHover;
|
|
||||||
this.AdminClickEvent = AdminClickEvent;
|
|
||||||
this.AdminAction = AdminAction;
|
|
||||||
this.AdminActionValue = AdminActionValue;
|
|
||||||
|
|
||||||
this.ConsoleEnable = ConsoleEnable;
|
|
||||||
this.ConsoleCommandEnable = ConsoleCommandEnable;
|
|
||||||
this.ConsoleCommands = ConsoleCommands;
|
|
||||||
this.ConsoleMessageEnable = ConsoleMessageEnable;
|
|
||||||
this.ConsoleMessages = ConsoleMessages;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,7 +11,7 @@ public class AliasRegister {
|
|||||||
Plugin plugin = Main.plugin;
|
Plugin plugin = Main.plugin;
|
||||||
for (String alias : Main.allAliases) {
|
for (String alias : Main.allAliases) {
|
||||||
if (Main.aliasHashMap.get(alias) != null) {
|
if (Main.aliasHashMap.get(alias) != null) {
|
||||||
if (Main.aliasHashMap.get(alias).AliasEnable) {
|
if (Main.aliasHashMap.get(alias).aliasEnable) {
|
||||||
Bsend.debug(plugin, "Alias register 1.18_R1");
|
Bsend.debug(plugin, "Alias register 1.18_R1");
|
||||||
ProxyServer.getInstance().getPluginManager().registerCommand(Main.plugin, new RegisterCommands(alias));
|
ProxyServer.getInstance().getPluginManager().registerCommand(Main.plugin, new RegisterCommands(alias));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user