9.0 #1

Merged
JaTiTV merged 13 commits from CloseInventory into main 2021-12-31 16:19:31 +00:00
Showing only changes of commit 5e3a3d290c - Show all commits

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);
}