L

create an simple auth plugin with seasons based logins bedrock players will don't need to auth premium accounts get automatically login and add titles and subtitles for everything like for cracked players, Premium players and add actionbar to show remaining auth time and for register the is no time limit make sure everything configurable from confing.yml plugin name: PmcAuth, version: 1.0, Description: "PMC NETWORK ON TOP"

Kodari AI
KodariApr 5 at 3:07 am 17,658 (v2)

I’ll create a comprehensive authentication plugin with premium/bedrock auto-login, season tracking, and full title/subtitle/actionbar support.

PmcAuth
A comprehensive authentication plugin with season-based login tracking. Automatically logs in premium and Bedrock players while requiring cracked players to authenticate. Features configurable timeouts, titles, subtitles, and actionbars for all authentication events. Includes session management, season statistics, and fully customizable messages. Supports Floodgate for bedrock detection and Mojang API for premium verification.

All files created successfully! The plugin features:

  • Season-based tracking (MONTHLY, WEEKLY, DAILY) with stat displays

  • Bedrock auto-login via Floodgate detection

  • Premium auto-login via Mojang API verification

  • Configurable timeouts (login only - register has no time limit)

  • Titles, subtitles, and actionbars for all events

  • Session persistence to skip re-authentication

  • Admin commands for reload, stats, and force login

  • Full password security with SHA-256 hashing

Players will experience different flows based on their account type, all with rich visual feedback.

L

The compilation failed with this error:

code
Compilation failed with 8 error(s):

ERROR in src/main/java/com/pmcnetwork/pmcauth/command/RegisterCommand.java at line 62: incompatible types: ConfigManager cannot be converted to ConfigGetter
            MessageUtil.sendAuthMessage(player, "register-success", plugin.getConfigManager());
                                                                                           ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/command/LoginCommand.java at line 48: incompatible types: ConfigManager cannot be converted to ConfigGetter
            MessageUtil.sendAuthMessage(player, "login-success", plugin.getConfigManager());
                                                                                        ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/command/PmcAuthCommand.java at line 126: incompatible types: ConfigManager cannot be converted to ConfigGetter
        MessageUtil.sendAuthMessage(target, "login-success", plugin.getConfigManager());
                                                                                    ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/listener/AuthListener.java at line 32: incompatible types: ConfigManager cannot be converted to ConfigGetter
            MessageUtil.sendAuthMessage(player, "session-restored", plugin.getConfigManager());
                                                                                           ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/listener/AuthListener.java at line 39: incompatible types: ConfigManager cannot be converted to ConfigGetter
            MessageUtil.sendAuthMessage(player, "bedrock-auto-login", plugin.getConfigManager());
                                                                                             ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/listener/AuthListener.java at line 49: incompatible types: ConfigManager cannot be converted to ConfigGetter
                        MessageUtil.sendAuthMessage(player, "premium-auto-login", plugin.getConfigManager());
                                                                                                         ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/listener/AuthListener.java at line 65: incompatible types: ConfigManager cannot be converted to ConfigGetter
            MessageUtil.sendAuthMessage(player, "login-required", plugin.getConfigManager());
                                                                                         ^

ERROR in src/main/java/com/pmcnetwork/pmcauth/listener/AuthListener.java at line 69: incompatible types: ConfigManager cannot be converted to ConfigGetter
            MessageUtil.sendAuthMessage(player, "register-required", plugin.getConfigManager());
                                                                                            ^


=== COMPILATION ERROR ANALYSIS ===

TYPE MISMATCHES:
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
  - incompatible types: ConfigManager cannot be converted to ConfigGetter
ACTION: Fix variable types or casting

FILES TO INVESTIGATE:
  - src/main/java/com/pmcnetwork/pmcauth/command/RegisterCommand.java
  - src/main/java/com/pmcnetwork/pmcauth/command/LoginCommand.java
  - src/main/java/com/pmcnetwork/pmcauth/command/PmcAuthCommand.java
  - src/main/java/com/pmcnetwork/pmcauth/listener/AuthListener.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariApr 5 at 3:24 am 7,747 (v2)

I need to read the relevant files to understand the type mismatch between ConfigManager and ConfigGetter.

I can see the issue. The MessageUtil.sendAuthMessage method expects a ConfigGetter interface, but ConfigManager doesn’t implement it. The ConfigManager already has the required methods (getMessage() and getPrefix()), so I just need to make it implement the interface.

Fixed! The ConfigManager now implements the MessageUtil.ConfigGetter interface, which resolves all 8 compilation errors. The class already had the required methods (getMessage() and getPrefix()), so no other changes were needed.

L

make this changes and add following features remove current sessions which you added add this

  1. Session-Based Login (IP Based)

Add a session system so players don’t need to log in again after reconnecting within a configurable time.

Requirements:

Session must be based on player UUID + IP address

If player rejoins within session time and IP matches → auto login

If IP changes → require login again

Session time must be configurable in config.yml

  1. BossBar Login Timer

Replace ActionBar login messages with a BossBar.

Requirements:

Show remaining login time in BossBar

Update every second (configurable)

Fully configurable (text, color, style)

  1. Invisible & Unhittable Player

While player is not logged in:

Player must be completely invisible for other players

Player must be invulnerable (cannot take damage)

Player cannot be hit or targeted by players or mobs

  1. Player Isolation System

While player is not logged in:

Visibility:

Player cannot see other players

Other players cannot see this player

Chat:

Player cannot send messages

Player cannot receive messages

(Don't hide this plugin Messages)

Interaction:

Block movement

Block jumping

Block inventory interaction

Block all commands except:

/login

/register

(make sure if player try run any other command that command must get instantly cancelled before even reaching to logs)

  1. Config Support

All features must be configurable in config.yml, including:

Session enable/disable

Session duration

BossBar settings

Login timeout

Enable/disable invisibility and isolation

  1. Technical Requirements

Compatible with Paper/Spigot API

Use appropriate event listeners:

PlayerJoinEvent

PlayerQuitEvent

PlayerMoveEvent

AsyncPlayerChatEvent

EntityDamageEvent

Use BossBar API

Ensure proper performance and thread safety

  1. Auth Location

make sure by default if a auth location is not set by any OP. the player must login at the world spawn after an successfull login player teleported to his last quit location. add an command to set auth location for OPs if an auth location is set all players will login at that location during the login time after an successful login player will teleported to his last quit location.

  1. Edge Cases

Do not create session if player disconnects before login

Reset sessions on server restart (or make optional)

Handle multiple players on same IP safely (use UUID + IP)

Kodari AI
KodariApr 5 at 11:35 am 42,968 (v2)

I’ll read the existing files first to understand the current structure, then implement all the requested features.

I’ll implement all the requested features. Let me start by reading the project structure and creating the necessary files.

Now I’ll create the remaining files:

All features have been implemented:

  1. Session-Based Login (IP Based) - UUID + IP validation with configurable duration

  2. BossBar Login Timer - Replaces ActionBar with fully configurable BossBar

  3. Invisible & Unhittable Player - Invisibility potion + invulnerability + no mob targeting

  4. Player Isolation System - Complete isolation (visibility, chat, movement, jumping, inventory, commands)

  5. Config Support - All features configurable in config.yml

  6. Technical Requirements - All event listeners implemented with proper thread safety

  7. Auth Location - Default world spawn, with /setauthlocation command for custom location

  8. Edge Cases - Sessions only created after successful login, IP validation, UUID-based tracking

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
22 1,779
src/main/java/com/pmcnetwork/pmcauth/PmcAuth.java
package com.pmcnetwork.pmcauth;

import com.pmcnetwork.pmcauth.command.LoginCommand;
import com.pmcnetwork.pmcauth.command.PmcAuthCommand;
import com.pmcnetwork.pmcauth.command.RegisterCommand;
import com.pmcnetwork.pmcauth.command.SetAuthLocationCommand;
import com.pmcnetwork.pmcauth.listener.AuthListener;
import com.pmcnetwork.pmcauth.manager.AuthManager;
import com.pmcnetwork.pmcauth.manager.BossBarManager;
import com.pmcnetwork.pmcauth.manager.ConfigManager;
import com.pmcnetwork.pmcauth.manager.IsolationManager;
import com.pmcnetwork.pmcauth.manager.LocationManager;
import com.pmcnetwork.pmcauth.manager.PlayerDataManager;
import com.pmcnetwork.pmcauth.manager.SeasonManager;
import com.pmcnetwork.pmcauth.manager.SessionManager;
import com.pmcnetwork.pmcauth.util.PremiumChecker;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class PmcAuth extends JavaPlugin {

    private ConfigManager configManager;
    private AuthManager authManager;
    private PlayerDataManager playerDataManager;
    private SeasonManager seasonManager;
    private SessionManager sessionManager;
    private BossBarManager bossBarManager;
    private IsolationManager isolationManager;
    private LocationManager locationManager;
    private PremiumChecker premiumChecker;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.sessionManager = new SessionManager(this);
        this.authManager = new AuthManager(this);
        this.seasonManager = new SeasonManager(this);
        this.bossBarManager = new BossBarManager(this);
        this.isolationManager = new IsolationManager(this);
        this.locationManager = new LocationManager(this);
        this.premiumChecker = new PremiumChecker();
        
        getServer().getPluginManager().registerEvents(new AuthListener(this), this);
        
        getCommand("login").setExecutor(new LoginCommand(this));
        getCommand("register").setExecutor(new RegisterCommand(this));
        getCommand("pmcauth").setExecutor(new PmcAuthCommand(this));
        getCommand("setauthlocation").setExecutor(new SetAuthLocationCommand(this));
        
        getLogger().info("PmcAuth has been enabled! PMC NETWORK ON TOP");
    }

    @Override
    public void onDisable() {
        if (bossBarManager != null) {
            bossBarManager.removeAllBossBars();
        }
        if (isolationManager != null) {
            isolationManager.clearAll();
        }
        if (sessionManager != null) {
            if (!configManager.isPersistSessionsOnRestart()) {
                sessionManager.clearAllSessions();
            }
        }
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
        getLogger().info("PmcAuth has been disabled!");
    }
}