Bugfix in '/t2code debug createReportLog'

This commit is contained in:
JaTiTV 2022-02-09 14:40:27 +01:00
parent 15f2a5d422
commit 810e61f0e2
7 changed files with 29 additions and 23 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>11.0</version>
<version>11.1</version>
<packaging>jar</packaging>
<name>T2CodeLib</name>

View File

@ -8,6 +8,7 @@ import net.t2code.lib.Spigot.Lib.vault.Vault;
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;
@ -52,13 +53,16 @@ public class CreateReportLog {
pWriter.println("Vault: " + Bukkit.getPluginManager().getPlugin("Vault").getName() + " - " + Bukkit.getPluginManager().getPlugin("Vault").getDescription().getVersion());
} else pWriter.println("Vault: not connected");
if (Main.eco != null) {
String st;
st = Main.eco.getName();
String st = Main.eco.getName();
if (Main.eco.getName().equals("CMIEconomy")) st = "CMI";
pWriter.println("Economy: " + Main.eco.isEnabled() + " - " + Main.eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion());
if (Bukkit.getPluginManager().getPlugin(st) != null) {
pWriter.println("Economy: " + Main.eco.isEnabled() + " - " + st + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion());
} else pWriter.println("Economy: " + Main.eco.isEnabled() + " - " + st);
} else pWriter.println("Economy: not connected via vault");
if (Main.perm != null) {
if (Bukkit.getPluginManager().getPlugin(Main.perm.getName()) != null) {
pWriter.println("Permission: " + Main.perm.isEnabled() + " - " + Main.perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(Main.perm.getName()).getDescription().getVersion());
} else pWriter.println("Permission: " + Main.perm.isEnabled() + " - " + Main.perm.getName());
} else pWriter.println("Permission: not connected via vault");
pWriter.println();
pWriter.println("Java: " + System.getProperty("java.version"));

View File

@ -47,10 +47,11 @@ public final class Main extends JavaPlugin {
plugin = this;
autor = plugin.getDescription().getAuthors();
version = plugin.getDescription().getVersion();
Long long_;
long long_;
long_ = T2CodeTemplate.onLoadHeader(prefix, autor, version, spigot, discord);
if (Util.getSnapshot()){
send.console(prefix + " §eYou are running §4" + version + " §eof " + prefix + "§e! §4This is a trial version! §eSome features may not be working as expected. Please report all bugs here: http://dc.t2code.net §4UpdateChecker & bStats may be disabled!");
send.console(prefix + " §eYou are running §4" + version + " §eof " + prefix + "§e! §4This is a trial version! §eSome features may not be working as expected." +
" Please report all bugs here: http://dc.t2code.net §4UpdateChecker & bStats may be disabled!");
send.console(prefix + " §4 §e-------------------");
try {
Thread.sleep(5000);
@ -83,25 +84,26 @@ public final class Main extends JavaPlugin {
ItemVersion.scan();
send.console(Main.prefix + " §3Server run on: §6" + MCVersion.isVersion + " / " + NMSVersion.isNMS);
if (eco != null) {
String st;
st = eco.getName();
String st = eco.getName();
if (eco.getName().equals("CMIEconomy")) st = "CMI";
if (Bukkit.getPluginManager().getPlugin(st) != null){
send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion() + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
} else send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
} else send.console(Main.prefix + " §3Economy: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " - " + Bukkit.getPluginManager().getPlugin(st).getDescription().getVersion() + " §7- §e" +
(System.currentTimeMillis() - long_) + "ms");
} else send.console(Main.prefix + " §3Economy: §6" + eco.getName() + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else send.console(Main.prefix + " §3Economy: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
if (perm != null) {
if (Bukkit.getPluginManager().getPlugin(perm.getName()) != null){
send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(perm.getName()).getDescription().getVersion() + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
} else send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
} else send.console(Main.prefix + " §3Permission plugin: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - " + Bukkit.getPluginManager().getPlugin(perm.getName()).getDescription().getVersion()
+ " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else send.console(Main.prefix + " §3Permission plugin: §6" + perm.getName() + " - §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else send.console(Main.prefix + " §3Permission plugin: §4not connected via vault!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
if (PluginCheck.pluginCheck("PlaceholderAPI")) {
send.console(Main.prefix + " §3PlaceholderAPI: §6connected" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
send.console(Main.prefix + " §3PlaceholderAPI: §6connected" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
Main.plugin.getCommand("t2code").setExecutor(new CmdExecuter());
ConfigCreate.configCreate();
LanguagesCreate.langCreate();

View File

@ -1,5 +1,5 @@
name: T2CodeLib
version: 11.0
version: 11.1
main: net.t2code.lib.Bungee.BMain
author: JaTiTV, Jkobs
description: Libarie from T2Code Plugins

View File

@ -1,5 +1,5 @@
name: T2CodeLib
version: 11.0
version: 11.1
main: net.t2code.lib.Spigot.system.Main
api-version: 1.13
prefix: T2CodeLib