Files
GemosCore
GemosItems
GemosPlayer
build.gradle
settings.gradle
Code
55 3,673
GemosCore/src/main/java/com/gemos/core/GemosCore.java
package com.gemos.core;
import com.gemos.core.api.GemosAPI;
import com.gemos.core.command.ProfileCommand;
import com.gemos.core.command.StatsCommand;
import com.gemos.core.data.DataManager;
import com.gemos.core.inventory.gui.GUIListener;
import com.gemos.core.inventory.gui.GUIManager;
import com.gemos.core.listener.CorePlayerListener;
import com.gemos.core.profile.ProfileManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class GemosCore extends JavaPlugin {
private DataManager dataManager;
private ProfileManager profileManager;
private GUIManager guiManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.dataManager = new DataManager(this);
this.profileManager = new ProfileManager(this, dataManager);
this.guiManager = new GUIManager();
GemosAPI.init(this);
getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
getServer().getPluginManager().registerEvents(new CorePlayerListener(this), this);
getCommand("profile").setExecutor(new ProfileCommand(this));
getCommand("stats").setExecutor(new StatsCommand(this));
getLogger().info("GemosCore enabled — Player profile system active.");
}
@Override
public void onDisable() {
if (profileManager != null) {
profileManager.saveAll();
}
getLogger().info("GemosCore disabled — All profiles saved.");
}
}