Files
src
build.gradle
Code
16 1,420
src/main/java/com/clanplugin/ClanPlugin.java
package com.clanplugin;
import com.clanplugin.commands.ClanCommand;
import com.clanplugin.listeners.PlayerChatListener;
import com.clanplugin.listeners.PlayerDamageListener;
import com.clanplugin.listeners.PlayerJoinListener;
import com.clanplugin.managers.ClanManager;
import com.clanplugin.managers.DataManager;
import com.clanplugin.managers.MessageManager;
import com.clanplugin.managers.ScoreboardManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class ClanPlugin extends JavaPlugin {
private DataManager dataManager;
private MessageManager messageManager;
private ClanManager clanManager;
private ScoreboardManager scoreboardManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.dataManager = new DataManager(this);
this.messageManager = new MessageManager(this);
this.clanManager = new ClanManager(this);
this.scoreboardManager = new ScoreboardManager(this);
getCommand("clan").setExecutor(new ClanCommand(this));
getServer().getPluginManager().registerEvents(new PlayerDamageListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerChatListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
this.scoreboardManager.reloadAllPlayers();
getLogger().info("ClanSystem successfully enabled!");
}
@Override
public void onDisable() {
getLogger().info("ClanSystem disabled!");
}
}