Files
src
build.gradle
manifest.kod
Code
38 2,534
src/main/java/com/soulbound/Soulbound.java
package com.soulbound;
import com.soulbound.command.SoulboundCommand;
import com.soulbound.inventory.gui.GUIListener;
import com.soulbound.inventory.gui.GUIManager;
import com.soulbound.listener.*;
import com.soulbound.manager.*;
import dev.iiahmed.disguise.DisguiseManager;
import dev.iiahmed.disguise.DisguiseProvider;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class Soulbound extends JavaPlugin {
private DisguiseProvider disguiseProvider;
private ConfigManager configManager;
private PlayerDataManager playerDataManager;
private PhaseManager phaseManager;
private GravestoneManager gravestoneManager;
private RitualManager ritualManager;
private CustomItemManager customItemManager;
private ChatTagManager chatTagManager;
private ZombieAuraManager zombieAuraManager;
private AchievementManager achievementManager;
private GUIManager guiManager;
@Override
public void onEnable() {
DisguiseManager.initialize(this, true);
this.disguiseProvider = DisguiseManager.getProvider();
this.configManager = new ConfigManager(this);
this.customItemManager = new CustomItemManager(this);
this.playerDataManager = new PlayerDataManager(this);
this.achievementManager = new AchievementManager(this);
this.phaseManager = new PhaseManager(this);
this.gravestoneManager = new GravestoneManager(this);
this.ritualManager = new RitualManager(this);
this.chatTagManager = new ChatTagManager(this);
this.zombieAuraManager = new ZombieAuraManager(this);
this.guiManager = new GUIManager();
getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerRespawnListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerJoinQuitListener(this), this);
getServer().getPluginManager().registerEvents(new EntityDamageListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerMoveListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerInteractListener(this), this);
getServer().getPluginManager().registerEvents(new ChatListener(this), this);
getServer().getPluginManager().registerEvents(new CraftListener(this), this);
getServer().getPluginManager().registerEvents(new EntityTargetListener(this), this);
SoulboundCommand cmd = new SoulboundCommand(this);
getCommand("soulbound").setExecutor(cmd);
getCommand("soulbound").setTabCompleter(cmd);
getLogger().info("Soulbound has been enabled.");
}
@Override
public void onDisable() {
playerDataManager.saveAll();
getLogger().info("Soulbound has been disabled.");
}
}