final 13.0 & 13.1

13.1:
add by Commands "!asConsole" & "!onBungee"
This commit is contained in:
2022-11-03 07:57:53 +01:00
parent 667ff81357
commit 176e9724e7
24 changed files with 318 additions and 94 deletions

View File

@@ -3,6 +3,7 @@ package net.t2code.t2codelib.SPIGOT.system;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.permission.Permission;
import net.t2code.t2codelib.SPIGOT.api.items.T2CitemVersion;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion;
@@ -38,14 +39,7 @@ public final class T2CodeLibMain extends JavaPlugin {
plugin = this;
autor = plugin.getDescription().getAuthors();
version = plugin.getDescription().getVersion();
// try {
this.adventure = BukkitAudiences.create(this);
// nmIsLoad = true;
// } catch (Exception ex) {
// ex.printStackTrace();
// nmIsLoad = false;
// }
this.adventure = BukkitAudiences.create(this);
long long_ = T2Ctemplate.onLoadHeader(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
String prefix = Util.getPrefix();
@@ -56,10 +50,10 @@ public final class T2CodeLibMain extends JavaPlugin {
}
T2CmcVersion.onCheck();
if (T2CmcVersion.isMc1_19()) {
if (T2CmcVersion.isMc1_20()) {
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
T2Csend.console(prefix);
T2Csend.warning(plugin, "The 1.19.* is a very fresh / new version. If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
T2Csend.warning(plugin, "The 1.20.* is a very fresh / new version. If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
T2Csend.console(prefix);
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
try {
@@ -91,12 +85,16 @@ public final class T2CodeLibMain extends JavaPlugin {
plugin.getCommand("t2code").setExecutor(new CmdExecuter());
ConfigCreate.configCreate();
T2CitemVersion.scan();
LanguagesCreate.langCreate();
SelectLibConfig.onSelect();
SelectLibMsg.onSelect();
T2CupdateAPI.onUpdateCheck(plugin, prefix, Util.getSpigotID(), Util.getDiscord());
Metrics.Bstats(plugin, Util.getBstatsID());
if (SelectLibConfig.getBungee()){
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bcmd");
}
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);
T2Ctemplate.onLoadFooter(prefix, long_);
@@ -113,15 +111,14 @@ public final class T2CodeLibMain extends JavaPlugin {
}
}
Vault.vaultDisable();
T2Ctemplate.onDisable(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
if (nmIsLoad) {
if (this.adventure != null) {
this.adventure.close();
this.adventure = null;
}
}
Vault.vaultDisable();
T2Ctemplate.onDisable(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
}
public static File getPath() {