nottanmay

Remove the admin panel dude

Kodari AI
KodariJun 22 at 3:56 pm 10

I’ll help you remove the admin panel. First, let me check what we’re working with.

I don’t see an admin panel in this project. The only “admin” reference is in the config.yml file under join-messages, which is just a group-based welcome message configuration.

Could you clarify what you’d like removed? Are you referring to:

  • The admin join message configuration in config.yml?

  • A specific feature or command?

  • Something else?

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
18 1,316
src/main/java/com/nottanmayyy/lhauth/LHauth.java
package com.nottanmayyy.lhauth;

import com.nottanmayyy.lhauth.commands.CreditsCommand;
import com.nottanmayyy.lhauth.commands.LoginCommand;
import com.nottanmayyy.lhauth.commands.RegisterCommand;
import com.nottanmayyy.lhauth.listeners.PlayerJoinListener;
import com.nottanmayyy.lhauth.listeners.PlayerQuitListener;
import com.nottanmayyy.lhauth.listeners.ProtectionListener;
import com.nottanmayyy.lhauth.managers.AuthManager;
import com.nottanmayyy.lhauth.managers.ConfigManager;
import com.nottanmayyy.lhauth.managers.JoinMessageManager;
import com.nottanmayyy.lhauth.managers.SessionManager;
import com.nottanmayyy.lhauth.managers.TitleManager;
import org.bukkit.plugin.java.JavaPlugin;

public class LHauth extends JavaPlugin {
    
    private ConfigManager configManager;
    private AuthManager authManager;
    private SessionManager sessionManager;
    private TitleManager titleManager;
    private JoinMessageManager joinMessageManager;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.sessionManager = new SessionManager(this);
        this.authManager = new AuthManager(this);
        this.titleManager = new TitleManager(this);
        this.joinMessageManager = new JoinMessageManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("LHauth has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (titleManager != null) {
            titleManager.stopAllTasks();
        }
        if (authManager != null) {
            authManager.saveAllData();
        }
        getLogger().info("LHauth has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("register").setExecutor(new RegisterCommand(this));
        getCommand("login").setExecutor(new LoginCommand(this));
        getCommand("credits").setExecutor(new CreditsCommand());
    }
    
    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        getServer().getPluginManager().registerEvents(new ProtectionListener(this), this);
    }
    
    public ConfigManager getConfigManager() {
        return configManager;
    }
    
    public AuthManager getAuthManager() {
        return authManager;
    }
    
    public SessionManager getSessionManager() {
        return sessionManager;
    }
    
    public TitleManager getTitleManager() {
        return titleManager;
    }
    
    public JoinMessageManager getJoinMessageManager() {
        return joinMessageManager;
    }
}