Small Code Changes
This commit is contained in:
@@ -19,7 +19,6 @@ public class Alias_CmdExecuter implements CommandExecutor, TabCompleter {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
Prefix = Main.prefix;
|
||||
|
||||
if (args.length == 0) {
|
||||
// Command
|
||||
|
@@ -3,6 +3,7 @@ package net.t2code.alias.Spigot.cmdManagement;
|
||||
import net.t2code.alias.Spigot.Main;
|
||||
import net.t2code.alias.Spigot.config.languages.SelectMessages;
|
||||
import net.t2code.alias.Spigot.system.Load;
|
||||
import net.t2code.alias.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
|
||||
@@ -13,26 +14,19 @@ import org.bukkit.plugin.Plugin;
|
||||
import java.util.List;
|
||||
|
||||
public class Commands {
|
||||
private static Plugin plugin = Main.plugin;
|
||||
private static String prefix = Main.prefix;
|
||||
private static List autor = Main.autor;
|
||||
private static String version = Main.version;
|
||||
private static String spigot = Main.spigot;
|
||||
private static String discord = Main.discord;
|
||||
|
||||
public static void info(CommandSender sender) {
|
||||
T2CodeTemplate.sendInfo(sender,prefix,spigot,discord,autor,version, UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion);
|
||||
T2CodeTemplate.sendInfo(sender, Util.getPrefix(),Util.getSpigot(),Util.getDiscord(),Main.autor,Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
|
||||
}
|
||||
|
||||
public static void reload(CommandSender sender) {
|
||||
if (sender instanceof Player) sender.sendMessage(SelectMessages.ReloadStart);
|
||||
send.console(prefix + "§8-------------------------------");
|
||||
send.console(prefix + " §6Plugin reload...");
|
||||
send.console(prefix + "§8-------------------------------");
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
send.console(Util.getPrefix() + " §6Plugin reload...");
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
Load.loadReload();
|
||||
if (sender instanceof Player) sender.sendMessage(SelectMessages.ReloadEnd);
|
||||
send.console(prefix + "§8-------------------------------");
|
||||
send.console(prefix + " §2Plugin successfully reloaded.");
|
||||
send.console(prefix + "§8-------------------------------");
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
send.console(Util.getPrefix() + " §2Plugin successfully reloaded.");
|
||||
send.console(Util.getPrefix() + "§8-------------------------------");
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ import net.t2code.alias.Spigot.config.config.SelectConfig;
|
||||
import net.t2code.alias.Spigot.config.languages.SelectMessages;
|
||||
import net.t2code.alias.Spigot.objects.Alias_Objekt;
|
||||
import net.t2code.alias.Spigot.system.*;
|
||||
import net.t2code.alias.Util;
|
||||
import net.t2code.lib.Spigot.Lib.commands.Cmd;
|
||||
import net.t2code.lib.Spigot.Lib.messages.TextBuilder;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
@@ -17,7 +18,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class RegisterCommands extends Command {
|
||||
private String alias;
|
||||
private String prefix = Main.prefix;
|
||||
private String prefix = Util.getPrefix();
|
||||
|
||||
public RegisterCommands(String alias) {
|
||||
super(alias);
|
||||
@@ -46,8 +47,8 @@ public class RegisterCommands extends Command {
|
||||
} else BCommand_Sender_Reciver.sendToBungee(player, cmd.replace("[player]", player.getName()), false);
|
||||
|
||||
} else {
|
||||
send.console(Main.prefix + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.player(player, Main.prefix + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
}
|
||||
} else {
|
||||
if (Alias.AdminCommandAsConsole) {
|
||||
@@ -101,8 +102,8 @@ public class RegisterCommands extends Command {
|
||||
} else BCommand_Sender_Reciver.sendToBungee(player, cmd.replace("[player]", player.getName()), false);
|
||||
|
||||
} else {
|
||||
send.console(Main.prefix + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.player(player, Main.prefix + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
}
|
||||
} else {
|
||||
if (Alias.CommandAsConsole) {
|
||||
@@ -144,8 +145,8 @@ public class RegisterCommands extends Command {
|
||||
if (SelectConfig.Bungee) {
|
||||
BCommand_Sender_Reciver.sendToBungee(sender, cmd.replace("[player]", sender.getName()), true);
|
||||
} else {
|
||||
send.console(Main.prefix + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.sender(sender, Main.prefix + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
send.sender(sender, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||
}
|
||||
} else {
|
||||
Cmd.console(cmd.replace("[player]", sender.getName()));
|
||||
|
Reference in New Issue
Block a user