9.0 #1
@ -4,6 +4,7 @@ import net.md_5.bungee.protocol.packet.Commands;
|
|||||||
import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
|
import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
|
||||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||||
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
|
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
|
||||||
|
import net.t2code.lib.Util;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -22,29 +23,36 @@ import java.util.zip.ZipEntry;
|
|||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
public class CmdExecuter implements CommandExecutor, TabCompleter {
|
public class CmdExecuter implements CommandExecutor, TabCompleter {
|
||||||
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;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (!sender.hasPermission("t2code.admin")){
|
||||||
|
send.sender(sender,"§4No Permission §8t2code.admin");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
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);
|
||||||
} else {
|
} else {
|
||||||
|
switch (args[0].toLowerCase()) {
|
||||||
|
case "info":
|
||||||
|
case "plugin":
|
||||||
|
case "pl":
|
||||||
|
case "version":
|
||||||
|
case "ver":
|
||||||
|
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ("debug".equals(args[0].toLowerCase())) {
|
if ("debug".equals(args[0].toLowerCase())) {
|
||||||
if (args.length != 2) {
|
if (args.length != 2) {
|
||||||
send.sender(sender,"§4Use: §7/t2code debug createReportLog");
|
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ("createreportlog".equals(args[1].toLowerCase())) {
|
if ("createreportlog".equals(args[1].toLowerCase())) {
|
||||||
|
|
||||||
CreateReportLog.create(sender);
|
CreateReportLog.create(sender);
|
||||||
|
|
||||||
} else send.sender(sender,"§4Use: §7/t2code debug createReportLog");
|
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||||
} else send.sender(sender,"§4Use: §7/t2code debug createReportLog");
|
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -53,6 +61,7 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
|
|||||||
//TabCompleter
|
//TabCompleter
|
||||||
private static HashMap<String, String> arg1 = new HashMap<String, String>() {{
|
private static HashMap<String, String> arg1 = new HashMap<String, String>() {{
|
||||||
put("debug", "t2code.admin");
|
put("debug", "t2code.admin");
|
||||||
|
put("info", "t2code.admin");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user