This commit is contained in:
2021-12-22 19:34:35 +01:00
parent 54b034fc31
commit 6d65f15f98
6 changed files with 11 additions and 14 deletions

View File

@@ -7,14 +7,11 @@ import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
import net.t2code.lib.Spigot.Lib.vault.Vault;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.zip.ZipEntry;
@@ -89,9 +86,7 @@ public class CreateReportLog {
//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);
pluginToDebug("T2C-LuckyBox", "T2C-LuckyBox", zip);
pluginToDebug("WonderBagShop", "WonderBagShop", zip);
pluginToDebug("CommandGUI", "CommandGUI", zip);
@@ -103,7 +98,7 @@ public class CreateReportLog {
pluginToDebug("LoreEditor", "LoreEditor", zip);
pluginToDebug("Booster", "Booster", zip);
pluginToDebug("AntiMapCopy", "AntiCopy", zip);
addFileToZip("", "logs/latest.log", zip, false);
zip.closeEntry();
zip.close();
} catch (IOException e) {
@@ -111,9 +106,9 @@ public class CreateReportLog {
}
file.delete();
if (sender instanceof Player) {
send.sender(sender, Main.prefix + " §6The DebugLog has been created. You can find it under: §e" + zipPath);
send.console(Main.prefix + " §6A DebugLog has been created. You can find it under: §e" + zipPath);
} else send.sender(sender, Main.prefix + " §6The DebugLog has been created. You can find it under: §e" + zipPath);
send.sender(sender, Main.prefix + " §6A DebugLog zip has been created. you can find it on in the files on your server under the path: §e" + zipPath);
send.console(Main.prefix + " §6A DebugLog zip has been created. you can find it on in the files on your server under the path: §e" + zipPath);
} else send.sender(sender, Main.prefix + " §6A DebugLog zip has been created. you can find it on in the files on your server under the path: §e" + zipPath);
}

View File

@@ -12,6 +12,7 @@ loadbefore: [ T2C-Alias ]
commands:
t2code:
aliases: t2c
permissions:
t2code.admin: