9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-20 07:29:15 +00:00

feat: Initial Commit

This commit is contained in:
LoJoSho
2023-12-22 21:24:55 -06:00
commit c0fdd970ea
48 changed files with 2253 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
package me.lojosho.hibiscuscommons;
import lombok.Getter;
import me.lojosho.hibiscuscommons.hooks.Hooks;
import me.lojosho.hibiscuscommons.nms.NMSHandlers;
import me.lojosho.hibiscuscommons.util.ServerUtils;
import org.bukkit.plugin.java.JavaPlugin;
public final class HibiscusCommonsPlugin extends HibiscusPlugin {
@Getter
private static HibiscusCommonsPlugin instance;
@Getter
private static boolean onPaper = false;
@Override
public void onStart() {
instance = this;
// Detects if a user is running a paper server
if (ServerUtils.hasClass("com.destroystokyo.paper.PaperConfig") || ServerUtils.hasClass("io.papermc.paper.configuration.Configuration")) {
onPaper = true;
getLogger().info("Detected Paper! Enabling Paper support...");
//getServer().getPluginManager().registerEvents(new PaperPlayerGameListener(), this);
}
if (!NMSHandlers.isVersionSupported()) {
getLogger().severe("This version is not supported! Consider switching versions?");
getServer().getPluginManager().disablePlugin(this);
return;
}
// Plugin startup logic
Hooks.setup();
}
}