9.0 #1

Merged
JaTiTV merged 13 commits from CloseInventory into main 2021-12-31 16:19:31 +00:00
Showing only changes of commit 3c6bb074d8 - Show all commits

View File

@ -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.send;
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
import net.t2code.lib.Util;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
@ -22,18 +23,25 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
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
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) {
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 {
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 (args.length != 2) {
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
@ -53,6 +61,7 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
//TabCompleter
private static HashMap<String, String> arg1 = new HashMap<String, String>() {{
put("debug", "t2code.admin");
put("info", "t2code.admin");
}};
@Override