11.4
This commit is contained in:
@@ -26,35 +26,36 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!sender.hasPermission("t2code.admin")){
|
||||
send.sender(sender,"§4No Permission §8t2code.admin");
|
||||
if (!sender.hasPermission("t2code.admin")) {
|
||||
send.sender(sender, "§4No Permission §8t2code.admin");
|
||||
return false;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
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())) {
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
case "debug":
|
||||
if (args.length != 2) {
|
||||
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||
return false;
|
||||
}
|
||||
if ("createreportlog".equals(args[1].toLowerCase())) {
|
||||
|
||||
CreateReportLog.create(sender);
|
||||
|
||||
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||
return false;
|
||||
|
||||
default:
|
||||
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -5,10 +5,10 @@ import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
|
||||
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
||||
import net.t2code.lib.Spigot.Lib.vault.Vault;
|
||||
import net.t2code.lib.Util;
|
||||
import net.t2code.luckyBox.api.LuckyBoxAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@@ -20,7 +20,6 @@ import java.util.Calendar;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
|
||||
public class CreateReportLog {
|
||||
protected static void create(CommandSender sender) {
|
||||
send.sender(sender, Main.prefix + " §6A DebugLog is created...");
|
||||
@@ -102,24 +101,26 @@ public class CreateReportLog {
|
||||
zip.putNextEntry(new ZipEntry(fileToZip.getName()));
|
||||
Files.copy(fileToZip.toPath(), zip);
|
||||
|
||||
//File logToZip = new File(log);
|
||||
//zipOut.putNextEntry(new ZipEntry(logToZip.getName()));
|
||||
//Files.copy(logToZip.toPath(), zipOut);
|
||||
|
||||
addFileToZip("", "logs/latest.log", zip, false);
|
||||
|
||||
//pluginToDebug("T2CodeLib", "T2CodeLib", zip); todo bugfix (servercrash)
|
||||
pluginToDebug("T2C-LuckyBox", "T2C-LuckyBox", zip);
|
||||
pluginToDebug("WonderBagShop", "WonderBagShop", zip);
|
||||
pluginToDebug("CommandGUI", "CommandGUI", zip);
|
||||
pluginToDebug("OPSecurity", "OPSecurity", zip);
|
||||
pluginToDebug("PaPiTest", "PaPiTest", zip);
|
||||
pluginToDebug("PlotSquaredGUI", "PlotSquaredGUI", zip);
|
||||
pluginToDebug("T2C-Alias", "T2Code-Alias", zip);
|
||||
for (String pl : Util.getT2cPlugins()){
|
||||
pluginToDebug(pl, zip);
|
||||
}
|
||||
|
||||
//pluginToDebug("T2C-LuckyBox", zip);
|
||||
//pluginToDebug("WonderBagShop", zip);
|
||||
//pluginToDebug("CommandGUI", zip);
|
||||
//pluginToDebug("OPSecurity", zip);
|
||||
//pluginToDebug("PaPiTest", zip);
|
||||
//pluginToDebug("PlotSquaredGUI", zip);
|
||||
//pluginToDebug("T2C-Alias", zip);
|
||||
//pluginToDebug("T2C-AutoResponse", zip);
|
||||
//
|
||||
//pluginToDebug("LoreEditor", zip);
|
||||
//pluginToDebug("Booster", zip);
|
||||
//pluginToDebug("AntiMapCopy", zip);
|
||||
//pluginToDebug("AntiCopy", zip);
|
||||
|
||||
pluginToDebug("LoreEditor", "LoreEditor", zip);
|
||||
pluginToDebug("Booster", "Booster", zip);
|
||||
pluginToDebug("AntiMapCopy", "AntiCopy", zip);
|
||||
zip.closeEntry();
|
||||
zip.close();
|
||||
} catch (IOException e) {
|
||||
@@ -133,7 +134,7 @@ public class CreateReportLog {
|
||||
|
||||
}
|
||||
|
||||
private static void pluginToDebug(String pluginName, String jar, ZipOutputStream zip) throws IOException {
|
||||
private static void pluginToDebug(String pluginName, ZipOutputStream zip) throws IOException {
|
||||
if (PluginCheck.pluginCheck(pluginName)) {
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName);
|
||||
File plConfigs = new File(plugin.getDataFolder().getPath());
|
||||
@@ -144,7 +145,7 @@ public class CreateReportLog {
|
||||
File[] fileArray = f.listFiles();
|
||||
|
||||
for (File config : fileArray) {
|
||||
if (config.getName().contains(jar) && config.getName().contains(".jar")) {
|
||||
if (config.getName().contains(pluginName) && config.getName().contains(".jar")) {
|
||||
addFileToZip("T2Code-Plugins", config.getPath(), zip, false);
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ import java.io.File;
|
||||
|
||||
public class SelectLibMsg {
|
||||
private static Plugin plugin = Main.plugin;
|
||||
private static String prefix = Main.prefix;
|
||||
private static String prefix = Main.prefix;
|
||||
|
||||
public static String selectMSG;
|
||||
|
||||
@@ -41,8 +41,6 @@ private static String prefix = Main.prefix;
|
||||
VaultNotSetUp = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.VaultNotSetUp"));
|
||||
SoundNotFound = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.SoundNotFound"));
|
||||
|
||||
|
||||
|
||||
send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user