itsfrozen

Light SMP Plugin (Paper 1.21.11) General Requirements Plugin Name: Light SMP Plugin Server Software: Paper 1.21.11 When a player joins the server for the first time only, a full-screen scrolling animation should appear, and the player should receive one random Light.

This reward must only happen once on the player's first join and must never happen again.

Light Abilities

  1. Fire Light (45% Chance)

Ability: Shift + Right Click Summon 20 TNT above the targeted location.

The TNT should fall from the sky and explode on impact.

Cooldown: 1 minute.

  1. Extra Inventory Light (55% Chance)

Ability: Shift + Right Click Open a personal extra inventory with 36 slots.

All inventory contents must be saved permanently.

Cooldown: None.

  1. Flying Light (25% Chance)

Ability: Shift + Right Click Allow the player to fly while in Survival mode.

The flight should behave like normal player flight (not Creative mode).

While flying, the player's body should remain tilted at approximately 90 degrees.

Cooldown: 1 minute.

  1. Invisibility Light (30% Chance)

Ability: Shift + Right Click Make the player completely invisible for 3 minutes.

All equipped armor must also become invisible.

No part of the player's body or armor should be visible.

This must work with every armor type currently available in Minecraft.

Cooldown: 1 minute.

  1. Teleport Light (35% Chance)

Ability: Shift + Right Click Open a INVENTORY GUI showing the heads of all online players.

Clicking a player's head teleports the user to that player.

Cooldown: 1 minute.

  1. Enchantment Light (40% Chance)

Ability: Right Click while holding a normal Book Only works with a regular Book.

Give the Book one random enchantment selected from all enchantments currently available in Minecraft.

Must not work on any other item.

Cooldown: None.

Light Items Every Light must be represented by a custom item.

These custom items must:

Be obtainable only through the plugin.

Not be obtainable in Survival.

Not work if obtained from Creative mode.

Not work if players create, duplicate, or give themselves a similar item.

Only plugin-generated Light items should activate their abilities.

Use custom NBT data or a Persistent Data Container to verify authenticity.

OP Commands Only players with OP permission can use these commands. /light all /light fire /light extrainventory /light flying /light invisibility /light teleport /light enchantment Command Functions /light all → Give all Light items. /light fire → Give Fire Light. /light extrainventory → Give Extra Inventory Light. /light flying → Give Flying Light. /light invisibility → Give Invisibility Light. /light teleport → Give Teleport Light. /light enchantment → Give Enchantment Light.

Non-OP players must not be able to use any of these commands.

Kodari AI
KodariJul 11 at 2:26 pm 12
LightSMPPlugin
LightSMPPlugin is a Paper 1.21.11 survival multiplayer plugin that awards each player one unique Light on their first join. Lights provide special abilities including TNT summoning, persistent extra storage, temporary survival flight, complete invisibility, player teleportation, and random book enchantments. Authenticated Persistent Data Container metadata prevents ordinary or self-created items from activating abilities, while OP-only commands provide controlled Light distribution.

Implements- authenticated Light items with first-join rewards and weighted random selection.

  • Adds all six Light abilities with their required cooldowns and durations.

  • Adds persistent 36-slot extra inventories and player-head teleport menus.

  • Adds OP-only /light commands and Paper 1.21.11 project configuration.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
15 951
src/main/java/com/kodari/lightsmp/LightSMPPlugin.java
package com.kodari.lightsmp;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class LightSMPPlugin extends JavaPlugin {
    private LightItemFactory lightItemFactory;
    private ExtraInventoryManager extraInventoryManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.lightItemFactory = new LightItemFactory(this);
        this.extraInventoryManager = new ExtraInventoryManager(this);
        TeleportMenuManager teleportMenuManager = new TeleportMenuManager(this);
        CooldownManager cooldownManager = new CooldownManager();

        Bukkit.getPluginManager().registerEvents(extraInventoryManager, this);
        Bukkit.getPluginManager().registerEvents(teleportMenuManager, this);
        Bukkit.getPluginManager().registerEvents(
                new LightAbilityListener(this, lightItemFactory, extraInventoryManager, teleportMenuManager, cooldownManager),
                this
        );
        Bukkit.getPluginManager().registerEvents(new FirstJoinManager(this, lightItemFactory), this);

        LightCommand lightCommand = new LightCommand(lightItemFactory);
        getCommand("light").setExecutor(lightCommand);
        getCommand("light").setTabCompleter(lightCommand);
    }

    @Override
    public void onDisable() {
        if (extraInventoryManager != null) {
            extraInventoryManager.saveOpenInventories();
        }
    }
}