jhlokhasan

Create a Minecraft SMP plugin called "SuperPowerSMP" where players obtain, equip, and display powers using a spin-based system, crafting system, and combat drop system.

━━━━━━━━━━━━━━━━━━━━━━ 📌 CORE CONCEPT ━━━━━━━━━━━━━━━━━━━━━━ Players receive random powers through a spin system when they first join the server.

Each player can equip up to 3 powers at a time.

Powers are represented as PAPER items in inventory.

Equipped powers are NOT shown in inventory slots UI, but displayed in a HUD above the hotbar (action bar / boss bar style UI).

━━━━━━━━━━━━━━━━━━━━━━ 📌 JOIN SPIN SYSTEM ━━━━━━━━━━━━━━━━━━━━━━

  • On first join, player gets 3 spins
  • Each spin gives 1 random power
  • Player receives 3 different powers
  • Powers are automatically added to inventory as paper items
  • /power clearjoin <player> resets spin system

━━━━━━━━━━━━━━━━━━━━━━ 📌 POWER EQUIP SYSTEM (IMPORTANT) ━━━━━━━━━━━━━━━━━━━━━━

  • Players can equip up to 3 powers
  • Powers are stored internally in 3 slots:

Slot 1, Slot 2, Slot 3 (NOT inventory slots)

  • When no power is equipped:

HUD shows: <----------------> <----------------> <---------------->

  • When 1 power is equipped:

Flight (Power Name) <----------------> <---------------->

  • When 3 powers are equipped:

Flight Fire Blast Teleport Dash

  • HUD must update in real time above hotbar / hunger bar area

━━━━━━━━━━━━━━━━━━━━━━ 📌 POWER ITEM SYSTEM ━━━━━━━━━━━━━━━━━━━━━━

  • All powers are PAPER items
  • Each paper contains:

- Power name - Description - Rarity - Slot binding info

  • Players can use /withdrawpower to remove powers from slots

━━━━━━━━━━━━━━━━━━━━━━ 📌 COMMAND SYSTEM ━━━━━━━━━━━━━━━━━━━━━━

/withdrawpower 1 → Removes power from slot 1 and gives paper item

/withdrawpower 2 → Removes power from slot 2

/withdrawpower 3 → Removes power from slot 3

/powers → Shows equipped powers in HUD + chat info

/powers list → Opens INVENTORY GUI showing all available powers

/power give <player> <power/all> → Gives power item(s) to player

/powers recipe → Opens INVENTORY GUI menu → Clicking a power shows crafting recipe

/power clearjoin <player> → Resets join spin system (player gets new spins on next join)

━━━━━━━━━━━━━━━━━━━━━━ 📌 POWER DROP SYSTEM ━━━━━━━━━━━━━━━━━━━━━━

  • When a player kills another player:

→ 1 random equipped power drops as PAPER item

  • Dropped power can be picked up and equipped by others

━━━━━━━━━━━━━━━━━━━━━━ 📌 CRAFTING SYSTEM ━━━━━━━━━━━━━━━━━━━━━━

  • Each power has a crafting recipe
  • Stronger powers require rarer materials
  • Recipes are shown in INVENTORY GUI (/powers recipe)
  • High tier powers have harder crafting recipes

━━━━━━━━━━━━━━━━━━━━━━ 📌 HUD DISPLAY SYSTEM (VERY IMPORTANT) ━━━━━━━━━━━━━━━━━━━━━━

  • Equipped powers are shown above hotbar (or action bar style)
  • Format:

Slot 1: Power Name Slot 2: Power Name Slot 3: Power Name

  • If slot is empty:

<---------------->

  • HUD updates instantly when:

- Power equipped - Power removed - Player joins server

━━━━━━━━━━━━━━━━━━━━━━ 📌 POWER SYSTEM RULES ━━━━━━━━━━━━━━━━━━━━━━

  • Max 3 powers per player
  • Powers are active only when equipped
  • No duplicate power stacking abuse
  • Balanced cooldown system required

━━━━━━━━━━━━━━━━━━━━━━ 📌 TECHNICAL REQUIREMENTS ━━━━━━━━━━━━━━━━━━━━━━

  • Use Spigot/Paper API
  • PlayerJoinEvent for spin system
  • PlayerDeathEvent for power drop system
  • PlayerInteractEvent for ability usage
  • Custom HUD system (action bar / scoreboard / boss bar)
  • Persistent storage (YAML or JSON)
  • Per-player cooldown system
  • Anti-duplication protection

━━━━━━━━━━━━━━━━━━━━━━ 📌 USER EXPERIENCE ━━━━━━━━━━━━━━━━━━━━━━

  • Spin animation/message on join
  • Smooth HUD updates for powers
  • Clear equip/withdraw messages
  • Sound + particle effects for abilities
  • INVENTORY GUI menus for powers and recipes

━━━━━━━━━━━━━━━━━━━━━━ 📌 OPTIONAL FEATURES ━━━━━━━━━━━━━━━━━━━━━━

  • Power rarity system (Common → Legendary)
  • Power fusion system (combine powers)
  • Leaderboard system (top players)
  • Special event powers (limited time drops)
Kodari AI
KodariApr 29 at 12:44 pm 7,651 (v2)

I’ll create a comprehensive SMP power system plugin with spin mechanics, crafting, and HUD display.

SuperPowerSMP
A comprehensive SMP enhancement plugin featuring a unique power system. Players receive random powers through a spin-based system on first join, equip up to 3 powers simultaneously, and view them in a real-time HUD displayed above the hotbar. Powers drop as collectible PAPER items on PvP kills, can be crafted through custom recipes with varying difficulty, and are managed through intuitive inventory GUIs. Features include automatic join spins, power slot management, withdrawal commands, crafting recipe viewers, power drop mechanics, and persistent player data storage with anti-duplication protection.

[Generation stopped]

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
10 531
src/main/java/com/superpowersmp/plugin/SuperPowerSMP.java
package com.superpowersmp.plugin;

import com.superpowersmp.plugin.command.PowerCommand;
import com.superpowersmp.plugin.command.PowersCommand;
import com.superpowersmp.plugin.command.WithdrawPowerCommand;
import com.superpowersmp.plugin.data.PlayerDataManager;
import com.superpowersmp.plugin.inventory.gui.GUIListener;
import com.superpowersmp.plugin.inventory.gui.GUIManager;
import com.superpowersmp.plugin.listener.PlayerDeathListener;
import com.superpowersmp.plugin.listener.PlayerJoinListener;
import com.superpowersmp.plugin.listener.PowerInteractListener;
import com.superpowersmp.plugin.power.PowerManager;
import com.superpowersmp.plugin.hud.HUDManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SuperPowerSMP extends JavaPlugin {
    
    private PowerManager powerManager;
    private PlayerDataManager playerDataManager;
    private GUIManager guiManager;
    private HUDManager hudManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.powerManager = new PowerManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.guiManager = new GUIManager();
        this.hudManager = new HUDManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("SuperPowerSMP has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
        
        if (hudManager != null) {
            hudManager.shutdown();
        }
        
        getLogger().info("SuperPowerSMP has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("power").setExecutor(new PowerCommand(this));
        getCommand("powers").setExecutor(new PowersCommand(this));
        getCommand("withdrawpower").setExecutor(new WithdrawPowerCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PowerInteractListener(this), this);
    }
}