Update 1.18 Start warning to 1.19 warning

This commit is contained in:
JaTiTV 2021-12-31 01:35:09 +01:00
parent 07145453b2
commit 5e3a3d290c
1 changed files with 13 additions and 2 deletions

View File

@ -16,6 +16,7 @@ import net.t2code.lib.Util;
import net.t2code.lib.Spigot.system.config.SelectLibConfig;
import net.t2code.lib.Spigot.system.languages.SelectLibMsg;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
@ -61,8 +62,13 @@ public final class Main extends JavaPlugin {
}
NMSVersion.onCheck();
MCVersion.onCheck();
if (MCVersion.minecraft1_18){
send.warning(this, "The 1.18 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");
if (MCVersion.minecraft1_19){
send.warning(this, "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");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
ItemVersion.scan();
send.console(Main.prefix + " §3Server run on: §6" + MCVersion.isVersion + " / " + NMSVersion.isNMS);
@ -100,6 +106,11 @@ public final class Main extends JavaPlugin {
@Override
public void onDisable() {
// Plugin shutdown logic
if (SelectLibConfig.InventoriesCloseByServerStop){
for (Player player : Bukkit.getOnlinePlayers()){
player.closeInventory();
}
}
Vault.vaultDisable();
T2CodeTemplate.onDisable(prefix, autor, version, spigot, discord);
}