finish T2ClibConfig create with coments

This commit is contained in:
2024-07-01 06:32:37 +02:00
parent a05223333c
commit 9413f0f7c8
26 changed files with 346 additions and 362 deletions

View File

@@ -3,6 +3,7 @@ package net.t2code.t2codelib.SPIGOT.system;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.permission.Permission;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import net.t2code.t2codelib.Util;
import org.bukkit.plugin.RegisteredServiceProvider;
@@ -22,14 +23,15 @@ public class Vault {
T2CodeLibMain.setEco(eco.getProvider());
if (T2CodeLibMain.getEco() != null) {
connected = true;
T2Csend.console(Util.getPrefix() + " §2Vault / Economy successfully connected!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
T2Ctemplate.onStartMsg(Util.getPrefix(), " §2Vault / Economy successfully connected!" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
} else {
connected = false;
T2Csend.console(Util.getPrefix() + " §4Economy could not be connected / found! [1]" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
T2Ctemplate.onStartMsg(Util.getPrefix(), " §4Economy could not be connected / found! [1]" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
} else {
connected = false;
T2Csend.console(Util.getPrefix() + " §4Economy could not be connected / found! [2]" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
T2Ctemplate.onStartMsg(Util.getPrefix(), " §4Economy could not be connected / found! [2]" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
RegisteredServiceProvider<Permission> perm = T2CodeLibMain.getPlugin().getServer().getServicesManager().getRegistration(Permission.class);
if (perm != null) {
@@ -38,13 +40,13 @@ public class Vault {
} else {
vaultEnable = false;
connected = false;
T2Csend.console(Util.getPrefix() + " §4Vault could not be connected! [3]" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
T2Ctemplate.onStartMsg(Util.getPrefix()," §4Vault could not be connected! [3]" + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}
}
public static void vaultDisable() {
if (!connected) return;
connected = false;
T2Csend.console(Util.getPrefix() + " §4Vault / Economy successfully deactivated.");
T2Ctemplate.onStartMsg(Util.getPrefix(), " §4Vault / Economy successfully deactivated.");
}
}