ZenitCoder
📎 1 file 1,642 chars
📄
pasted-code-1775836209759.txt
txt 1 lines
▶
Make a Minecraft Spigot/Paper plugin for version 1.20+ called “SticksSMP”. When a player joins the server for the first time, they should automatically receive one random special stick. Each stick must have a custom name, lore, passive ability, active ability, and an active cooldown. The active ability should trigger when the player right-clicks while holding the stick, detected using PlayerInteractEvent. Store the assigned stick in a data file so players always keep the same stick on future joins. Create a full modular system for sticks using a BaseStick class, with every stick extending it. Include at least seven built-in sticks: Fire Stick (passive: fire resistance, active: shoot fireball, cooldown 10s), Lightning Stick (passive: speed I, active: strike lightning where player looks), Healing Stick (passive: regen I every 5s, active: heal nearby teammates by 4 hearts), Teleport Stick (passive: slow falling, active: teleport 10 blocks forward), Phantom Stick (passive: night vision, active: turn invisible for 7s), Tank Stick (passive: resistance I, active: give absorption IV for 10s), Wind Stick (passive: jump boost II, active: knockback pulse pushing nearby entities). Passive abilities should apply only when the stick is in the player’s inventory or when held (depending on config). Add a config.yml containing cooldowns, ability enable/disable settings, and stick rarity weights. Add commands: /stick give   and /stick reload. Use a clean package structure with managers, listeners, and individual stick classes. The code must be optimized, fully functional, include comments, and follow clean OOP design.
Kodari AI
KodariApr 10 at 3:53 pm 15,700 (v2)

I’ll create a comprehensive SticksSMP plugin with a full modular stick system.

SticksSMP
A unique survival plugin where players receive one random special stick on first join. Each stick has custom passive abilities, active abilities with cooldowns, and unique effects. Features seven unique sticks (Fire, Lightning, Healing, Teleport, Phantom, Tank, Wind) with fully configurable abilities, cooldowns, and rarity weights. Includes persistent data storage, admin commands, and clean OOP architecture with extensible stick system.

All files created successfully! The plugin features:

Architecture:

  • Clean OOP design with BaseStick abstract class and 7 stick implementations

  • Modular package structure (stick, data, listener, command, config)

  • Persistent data storage using YAML

  • Weighted random stick assignment

Features:

  • First-join detection with automatic stick assignment

  • Right-click active abilities with cooldowns

  • Passive effects applied via repeating task (configurable: HELD/INVENTORY mode)

  • Full XSeries integration for cross-version compatibility

  • Commands: /stick give <player> <stick> and /stick reload

  • Configurable cooldowns, weights, and enable/disable per stick

7 Unique Sticks:

  1. Fire Stick - Fire resistance + shoot fireball

  2. Lightning Stick - Speed I + strike lightning

  3. Healing Stick - Regeneration I + heal nearby allies

  4. Teleport Stick - Slow falling + teleport forward

  5. Phantom Stick - Night vision + invisibility

  6. Tank Stick - Resistance I + absorption IV

  7. Wind Stick - Jump boost II + knockback pulse

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
21 1,173
src/main/java/com/stickssmp/SticksSMP.java
package com.stickssmp;

import com.stickssmp.command.StickCommand;
import com.stickssmp.config.ConfigManager;
import com.stickssmp.data.DataManager;
import com.stickssmp.listener.InteractListener;
import com.stickssmp.listener.JoinListener;
import com.stickssmp.listener.PassiveListener;
import com.stickssmp.stick.StickManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SticksSMP extends JavaPlugin {
    private ConfigManager configManager;
    private DataManager dataManager;
    private StickManager stickManager;
    
    @Override
    public void onEnable() {
        configManager = new ConfigManager(this);
        dataManager = new DataManager(this);
        stickManager = new StickManager(this);
        
        registerListeners();
        registerCommands();
        
        getLogger().info("SticksSMP has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (dataManager != null) {
            dataManager.save();
        }
        getLogger().info("SticksSMP has been disabled!");
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new JoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new InteractListener(this), this);
        new PassiveListener(this);
    }
    
    private void registerCommands() {
        StickCommand stickCommand = new StickCommand(this);
        getCommand("stick").setExecutor(stickCommand);
        getCommand("stick").setTabCompleter(stickCommand);
    }
}