Jeevan Bohara

Hey I want you to make a plugin where like I have a private server whenever is a player using /login command register after/before that they go into loading terrain where they can't run hit or kill anyone and other mobs/player kills them so I want you to do is make the player get no hit or damage from anything in that duration of loading terrain and when they are using resource pack of server like required resources pack for server so for that duration only I want you to make the get no damage from anything player etc and after they r logged in properly make it normal everything take damage die etc Disable damage... ...by entities ...by blocks ...by anything else (fall damage, etc.) Prevent the player from dropping/picking up items Cancel the join protection if the player... ...attacks an entity ...moves X blocks ...breaks/places blocks for the joining time until they move and resources pack of server is fully user for them this shall cause no issue timeout issue no lag most smooth no bugs like everyone is still un damageable after joining when they r already logged.

Kodari AI
KodariOct 20 at 9:11 am 1
LoginInvincibilityGuard
A Minecraft plugin that protects players during login and resource pack loading. Upon joining, players enter an invulnerable state where all damage sources are disabled, including entity attacks, environmental damage, fall damage, and block hazards. Item interaction is blocked during this period. Protection automatically ends once the player moves a configurable distance or the resource pack loading completes. The system handles edge cases like timeout issues and ensures no residual invincibility after login completes. Features configurable protection duration, movement threshold for cancellation, and comprehensive event handling for smooth, bug-free gameplay. Designed for private servers with resource pack requirements, ensuring seamless player experience without lag or unintended invulnerability persistence.
  1. Create a Paper plugin that tracks each joining player’s authentication and resource-pack state.

  2. Cancel all damage and item interactions while protection is active, with configured activity and timeout release rules.

  3. Add the plugin metadata and configuration.

Created the plugin with damage protection during login/resource-pack loading, item pickup/drop blocking, and configurable release triggers.

The generic /login and /register detection treats running the command as authentication; it can’t verify whether the password was accepted. Also, the configured movement, attack, block-change, and 180-second timeout rules can release protection before the pack finishes loading. Configure those release rules to fit your authentication plugin and desired safety behavior.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 329
src/main/java/com/kodari/joinprotection/JoinProtectionPlugin.java
package com.kodari.joinprotection;

import org.bukkit.plugin.java.JavaPlugin;

public final class JoinProtectionPlugin extends JavaPlugin {
    private ProtectionManager protectionManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        protectionManager = new ProtectionManager(this);
        getServer().getPluginManager().registerEvents(new ProtectionListener(this, protectionManager), this);
        getServer().getScheduler().runTaskTimer(this, protectionManager::tick, 20L, 20L);
    }

    @Override
    public void onDisable() {
        if (protectionManager != null) {
            protectionManager.clear();
        }
    }
}