siddopxd

The plugin is working fine but the only problem is that the normal players aren't able to login or register even though they have luckperms permission frozenauth.login ,frozenauth.register and frozenauth.changepass plz fix the issue by correcting codes if it's written incorrect and add a reload cmd to reload plugin manually from the server /frozenauth reload

Kodari AI
KodariJan 24 at 6:12 am 865 (v2)
siddopxd

Add a bypass permission in which those player who has frozenauth.bypass permission they don't need to login or register the plugin will bypass those players

Kodari AI
KodariJan 25 at 6:56 am 112 (v2)

What classes will I call methods on?

I will call methods on Player (for hasPermission), and possibly on the main plugin class for permission strings. I need to read JoinListener.java, FrozenAuth.java, and PlayerDataManager.java to understand the authentication flow and where to add the bypass check. Also, read MoveListener.java and CommandBlockListener.java to see where authentication is enforced.

siddopxd

Add a bypass permission in which those player who has frozenauth.bypass permission they don't need to login or register the plugin will bypass those players. Plz add this feature by creating new codes

Kodari AI
KodariJan 25 at 7:04 am 487 (v2)

What classes will I call methods on?

  • PlayerDataManager (to check authentication status)

  • JoinListener (to modify join handling for bypass)

  • MoveListener (to bypass movement restrictions)

  • CommandBlockListener (to bypass command restrictions)

  • InventoryClickListener (to bypass inventory restrictions)

  • QuitListener (to handle logout for bypass players if needed)

  • FrozenAuth (main class, possibly for permission checks or config)

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
21 916
src/main/java/com/drfrozenxd/frozenauth/FrozenAuth.java
package com.drfrozenxd.frozenauth;

import com.drfrozenxd.frozenauth.commands.*;
import com.drfrozenxd.frozenauth.data.PlayerDataManager;
import com.drfrozenxd.frozenauth.listener.*;
import org.bukkit.plugin.java.JavaPlugin;

public class FrozenAuth extends JavaPlugin {

    private static FrozenAuth instance;
    private PlayerDataManager dataManager;

    @Override
    public void onEnable() {
        instance = this;

        saveDefaultConfig();

        dataManager = new PlayerDataManager(this);
        dataManager.loadData();

        AuthTabCompleter completer = new AuthTabCompleter();

        getCommand("register").setExecutor(new RegisterCommand(this));
        getCommand("register").setTabCompleter(completer);

        getCommand("login").setExecutor(new LoginCommand(this));
        getCommand("login").setTabCompleter(completer);

        getCommand("resetpassword").setExecutor(new ResetPasswordCommand(this));
        getCommand("resetpassword").setTabCompleter(completer);

        getCommand("frozenauth").setExecutor(new ReloadCommand(this));

        // LISTENERS (FIXED)
        getServer().getPluginManager().registerEvents(new JoinListener(this), this);
        getServer().getPluginManager().registerEvents(new MoveListener(), this);
        getServer().getPluginManager().registerEvents(new CommandBlockListener(), this);
        getServer().getPluginManager().registerEvents(new InventoryClickListener(this), this);
        getServer().getPluginManager().registerEvents(new QuitListener(), this);

        getLogger().info("FrozenAuth enabled.");
    }

    @Override
    public void onDisable() {
        dataManager.saveData();
    }

    public static FrozenAuth getInstance() {
        return instance;
    }

    public PlayerDataManager getDataManager() {
        return dataManager;
    }
}