Stateman
📎 1 file 12,797 chars
📄
pasted-code-1794146737693.txt
txt 202 lines
▶
You are a Senior Minecraft Plugin Developer for Paper / Purpur 1.26.3 (Java 21).

TASK: Build me a COMPLETE, PRODUCTION-READY plugin named Featherinic. Gem SMP style system, but with FEATHERS + GOD FEATHER + CINEMATIC ROLL ANIMATION.

### 1. PLUGIN INFO
- Plugin Name: Featherinic
- Main Class: com.featherinic.Featherinic
- Version: 5.0.0 FINAL
- Author: SykonicSMP
- API Version: 1.26
- No lag, clean code, commented, no errors.

### 2. CORE SYSTEM - GEM SMP STYLE, BUT FEATHER
- PERMANENT Feather system like Gem SMP. NO auto-change. NO auto-expire. NO timer that changes feather after few seconds.
- Each player owns Feather as identity. Stays FOREVER until death or crafting.

CORRECT FLOW:
1. Player JOINS:
      - If already has Feather / Feather Star, GIVE NOTHING. No duplicate.
      - If has NOTHING, give 1x Feather Star in Slot 4 ONLY ONCE.
2. Feather Star:
      - Name: "&f&l✦ FEATHER STAR &e&l✦"
      - Material: NETHER_STAR, Enchanted glow, Unbreakable
      - Lore: "&7Right-Click to get your Permanent Feather!", "&e&lYour destiny awaits...", "&c&lOne Time Only"
      - Feather Star NEVER disappears by itself. ONLY changes when player RIGHT-CLICKS it.

### 3. CINEMATIC ROLL ANIMATION - MOST IMPORTANT, DO NOT SKIP
When player RIGHT-CLICKS Feather Star, this EXACT sequence MUST play:

STEP 1 - START (0s):
- Cancel player movement input, set player invulnerable for 4 seconds (no damage, no fall damage).
- Play Sound: BLOCK_BEACON_ACTIVATE + ENTITY_ENDER_DRAGON_GROWL
- Show Title: "&6&lROLLING...", Subtitle: "&fYour destiny is choosing..."
- Spawn particles: END_ROD circle around player.

STEP 2 - PLAYER FLIES UP IN AIR (0s - 3s):
- Give player Levitation effect for 3 seconds (Amplifier 1) so player SLOWLY RISES IN AIR, about 5 blocks up.
- Player must stay in air, floating, cannot move.
- Spawn particles under player: CLOUD + END_ROD + TOTEM continuously while rising.
- Play Sound: ENTITY_PHANTOM_FLAP loop.

STEP 3 - FEATHER SELECT ROULETTE - RANDOM CYCLING (0s - 3s):
- For 3 seconds, feather names must KEEP CHANGING RANDOMLY on screen like a slot machine / gacha spin.
- Show in TITLE (changes every 150ms, fast at start, slow at end):
  "🔥 FLAME..." -> "❄ FROST..." -> "⚡ STORM..." -> "👻 SHADOW..." -> "✚ LIGHT..." -> "☠ VENOM..." -> "🌪 WIND..." -> "🌌 VOID..." -> repeat random
- Also show in ACTIONBAR same cycling.
- Speed: Start fast (100ms per change), end slow (400ms per change) to build suspense, like slowing down.
- At the end of 3s, STOP on the FINAL chosen feather (weighted random).

STEP 4 - FEATHER GET + PLAYER FALLS DOWN (3s):
- Remove Levitation, give Slow Falling for 2 seconds so player FALLS DOWN SAFELY to ground, NO fall damage.
- Player drops down with particles: CLOUD + EXPLOSION + TOTEM burst on landing.
- Play Sound: ENTITY_GENERIC_EXPLODE + ENTITY_EXPERIENCE_ORB_PICKUP
- Remove Feather Star FOREVER, give 1x RANDOM Permanent Feather in same slot.
- Show Title: "&6&lYOUR FEATHER IS...", Subtitle: "[FINAL FEATHER NAME]"
- Show BossBar: Feather name for 5s.
- Chat: "&6[Featherinic] &fYour Permanent Feather is &l[NAME] &f!"

STEP 5 - THUNDER ON 4 SIDES (3.2s - Right after landing):
- Strike EXACTLY 4 LIGHTNINGS around player, 1 on each side, 3 blocks away, NO block damage, NO fire, ONLY visual + sound:
    - 1x Lightning FRONT (player facing direction, +3 blocks)
    - 1x Lightning BACK (-3 blocks)
    - 1x Lightning RIGHT (+3 blocks)
    - 1x Lightning LEFT (-3 blocks)
- Strikes must be staggered: 0.2s gap between each, not all at once: Front -> Right -> Back -> Left
- Play Sound: ENTITY_LIGHTNING_BOLT_THUNDER x4
- Particles: ELECTRIC_SPARK on each strike point.
- If final feather is VOID (Legendary), strike 8 lightnings instead (4 sides + 4 corners) + screen dark effect.

After animation ends, remove invulnerable, player can move normally.

### 4. EACH FEATHER HAS 2 POWERS
- POWER 1 = PERMANENT POTION EFFECT - Always active as long as Feather is in inventory/hotbar. If removed/dropped/in chest, effect STOPS instantly. If back, STARTS again. Re-apply on join, respawn, every 5s check.
- POWER 2 = ACTIVE RIGHT-CLICK POWER - Right-Click Feather to use. Has cooldown. Feather does NOT disappear after use.

THE 8 FEATHERS:

1. FLAME FEATHER - "&c&l🔥 FLAME FEATHER" - COMMON 20%
      - P1 PERMANENT: Fire Resistance (Infinite)
      - P2 ACTIVE: Fire Nova - 8 blocks, enemies on fire 5s, 6 hearts damage, knockback, no block damage. CD: 25s. Title: "&c&lFLAME NOVA!"

2. FROST FEATHER - "&b&l❄ FROST FEATHER" - COMMON 20%
      - P1 PERMANENT: Speed 1 (Infinite)
      - P2 ACTIVE: Freeze Aura - Freeze enemies 7 blocks 4s, 3 hearts damage. CD: 30s. Title: "&b&lFROZEN!"

3. STORM FEATHER - "&e&l⚡ STORM FEATHER" - RARE 12%
      - P1 PERMANENT: Haste 1 (Infinite)
      - P2 ACTIVE: Lightning Storm - 5 lightning on nearest enemies, 8 hearts, blindness 2s. CD: 35s. Title: "&e&lTHUNDER STRIKE!"

4. SHADOW FEATHER - "&5&l👻 SHADOW FEATHER" - RARE 12%
      - P1 PERMANENT: Night Vision (Infinite)
      - P2 ACTIVE: Shadow Dash - Teleport 12 blocks, Invisible 6s + Speed 3. CD: 20s. Title: "&5&lSHADOW DASH!"

5. LIGHT FEATHER - "&a&l✚ LIGHT FEATHER" - EPIC 8%
      - P1 PERMANENT: Regeneration 1 (Infinite)
      - P2 ACTIVE: Angel Heal - Full HP + Full Hunger + Clear bad effects + Absorption 4 hearts to teammates 5 blocks. CD: 45s. Title: "&a&lHEALED BY LIGHT!"

6. VENOM FEATHER - "&2&l☠ VENOM FEATHER" - RARE 12%
      - P1 PERMANENT: Strength 1 (Infinite)
      - P2 ACTIVE: Poison Cloud - 6 blocks 6s, Poison 2 + Wither 1 to enemies, player immune. CD: 30s. Title: "&2&lVENOM CLOUD!"

7. WIND FEATHER - "&f&l🌪 WIND FEATHER" - COMMON 20%
      - P1 PERMANENT: Jump Boost 2 (Infinite)
      - P2 ACTIVE: Tornado Launch - Launch player 15 blocks up + Slow Falling 8s + Launch enemies 10 blocks. CD: 25s. Title: "&f&lSKY TORNADO!"

8. VOID FEATHER - "&d&l🌌 VOID FEATHER" - LEGENDARY 5%
      - P1 PERMANENT: Resistance 1 + Strength 1 (BOTH Infinite)
      - P2 ACTIVE: Black Hole - Pull enemies 10 blocks to one point, 10 hearts damage, Strength 2 + Resistance 2 10s. CD: 60s. Title: "&d&lVOID COLLAPSE!"

Rarity weight-based in config. All values from config, NOT hardcoded.

### 5. GOD FEATHER - CRAFTING 8 FEATHERS = 1 GOD FEATHER
- Crafting Recipe in CRAFTING TABLE (3x3):
  [Flame] [Frost] [Storm]
  [Shadow] [EMPTY] [Light]
  [Venom] [Wind] [Void]
    - MUST be 8 DIFFERENT feathers. Same twice will NOT work. Center MUST be empty.
    - Also support Shapeless: Any placement with all 8 different feathers works, if shapeless: true.
- On Craft Success:
    - Consume all 8 Feathers. Give 1x GOD FEATHER.
    - Broadcast ALL: "&6[Featherinic] &e&l👑 {player} HAS CRAFTED THE GOD FEATHER!"
    - Title to crafter: "&6&l👑 GOD FEATHER!", Subtitle: "&eYou are now a GOD..."
    - Sound: WITHER_SPAWN + TOTEM + LEVELUP + DRAGON_GROWL. Particles: TOTEM + END_ROD + DRAGON_BREATH + FIREWORK x5.

GOD FEATHER - "&6&l👑 GOD FEATHER":
- Material: NETHER_STAR, Custom Model Data: 999, Enchanted glow, Unbreakable
- POWER 1 PERMANENT - ALL POTION EFFECTS AT ONCE:
  Fire Resistance 1 + Speed 2 + Haste 2 + Night Vision 1 + Regeneration 2 + Strength 2 + Jump Boost 2 + Resistance 2 + Absorption 2 + Saturation 1 (Infinite, all)
- POWER 2 ACTIVE - RIGHT-CLICK: God Nova
    - 15 block radius, ALL enemies: 15 hearts + On Fire 5s + Frozen 3s + Poison 3s + Lightning on each + Knockback
    - Self: Strength 3 + Resistance 3 + Speed 2 for 15s. CD: 90s. Title: "&6&l👑 GOD NOVA!"
- POWER 3 PASSIVE - 2 HIT KILL:
    - Melee hit ONLY (no bow/projectile).
    - 1st HIT on same target within 5s: Deal 80% max HP + Wither 2 (3s) + Slowness 2 (3s) + ActionBar to victim: "&c&l⚠ GOD HIT! &f1 More Hit = DEATH!"
    - 2nd HIT within 5s: INSTANT KILL - Bypass armor/totem/resistance (config: bypass-totem: true)
    - Title killer: "&6&l👑 GOD KILL!", victim: "&c&lKILLED BY GOD FEATHER!"
    - If 5s pass without 2nd hit, counter RESETS. Per-target UUID tracking.
    - Does NOT work on teammates.
    - God holder takes 50% less damage from all sources.

### 6. DEATH / STEAL SYSTEM
- If player DIES, Feather(s) / God Feather DROPS.
- Killer can PICK UP. Then killer has 2+ Feathers = multiple Permanent Effects.
- If player had NO Feather, on respawn give Feather Star again ONCE.
- Feather in inventory = effect ON. In chest/dropped = effect OFF.
- God Feather drop: Broadcast "&c[Featherinic] &f{player} LOST THE GOD FEATHER!"

### 7. TEXT EFFECTS - ALL REQUIRED
- TITLE: Big text center: Join, Roll, Feather Get, God Get, Power Use, God Kill
- SUBTITLE: Small text under Title: "Your destiny is choosing...", "You are now a GOD..."
- ACTIONBAR: Bottom bar, updates every 100ms during roulette, cooldown countdown: "&c&l⏳ &f[FEATHER] Cooldown: &c[X]s", permanent effect active message
- BOSSBAR: Top bar 5s on Feather Get / God Get: "[FEATHER NAME] - [EFFECT] Active"
- CHAT: Gradient / colored messages with prefix "&6[Featherinic] &f", support {player} {feather} {cooldown}
- GOD FEATHER SPECIAL: Rainbow / Gradient name, Typewriter effect for "You are now a GOD..." (letter by letter), Shake effect on GOD KILL title
- ROULETTE TEXT EFFECT: Title + ActionBar cycling random feather names fast -> slow, suspense effect
- Titles: fadeIn 10, stay 40, fadeOut 10. All configurable.

### 8. COMMANDS & PERMISSIONS
- /featherinic / /fi - Help
- /fi star - Give Feather Star (once)
- /fi give  
- /fi remove  - Remove all feathers
- /fi reload - Reload config
- /fi test - Toggle Testing Mode
- /fi giveall [player] - Give ALL 8 Feathers
- /fi god [player] - Give God Feather (admin/testing)
- /fi clear - Remove all feathers
- /fi cooldown clear - Clear all cooldowns
- /fi menu - Open Test Lab GUI (54 slots, all 8 + God clickable)
- Permissions: featherinic.use, featherinic.admin, featherinic.test, featherinic.god.craft, featherinic.* (all)
- Tab completion for all.

### 9. CREATIVE TESTING MODE
- If player in CREATIVE, auto-enable Testing Mode.
- In Testing: NO cooldowns, NO soulbound, CAN drop/move/chest/duplicate, powers work in spawn, God 2-Hit Kill still works with warning Title.
- On switch TO Creative: Auto /fi giveall + Title "&a&lTEST MODE"
- On switch BACK TO Survival: Remove test feathers, give back ONLY Feather Star if no feather, restore normal rules.
- Config: creative-testing: enabled: true, bypass-cooldown: true, bypass-soulbound: true, allow-in-spawn: true, auto-give-on-creative-switch: true

### 10. CONFIG FILES
- config.yml: All cooldowns, damages, radii, rarities, permanent effects, god settings, crafting settings, roll-animation settings (levitate-time: 3s, rise-height: 5, roulette-speed, thunder-count: 4, thunder-delay: 0.2s), messages, titles, sounds, particles, death-drop: true, steal: true
- messages.yml: ALL messages, prefix "&6[Featherinic] &f"
- feathers.yml: Full definition of all 8 feathers + God Feather (name, lore, material, custom-model-data, permanent-effect-1, active-power-2, god-2-hit-kill, damage, radius, duration, particles, sound, title)
- crafting.yml: God Feather recipe (shaped + shapeless toggle, require-all-8-different: true)
- NOTHING hardcoded.

### 11. ANTI-EXPLOIT (SURVIVAL ONLY)
- Feather effect checks ONLY inventory/hotbar, NOT enderchest/shulker.
- God crafting must check NBT / custom feather ID, NOT just normal feather - prevent fake feather exploit.
- God 2-Hit Kill ONLY melee, NOT bow/projectile.
- Roll animation: Player invulnerable + no fall damage during 4s animation, cannot move, cannot be hit.
- Cooldown per UUID, persists on relog.
- If inventory full on roll: Wait until slot free, ActionBar warning.

### 12. FILES & DELIVERY
Deliver:
- src/main/java/com/featherinic/ - Featherinic.java, FeatherManager.java, FeatherListener.java, FeatherPower.java, PermanentEffectManager.java, GodFeatherManager.java, CraftingManager.java, RollAnimationManager.java, CooldownManager.java, TitleManager.java, TestManager.java, commands/
- src/main/resources/ plugin.yml, config.yml, messages.yml, feathers.yml, crafting.yml
- README: How to install, how to change permanent effect, how to change God recipe, how to add 9th feather, how to change roll animation time / thunder count.
- Test checklist: Join test, Feather Star once test, Roll animation test (levitate + roulette + fall + 4 thunder), Permanent effect test, Active power test, Death drop + steal test, Craft 8 -> God test, God permanent effects test, God 2-Hit Kill test, God Nova test, Creative giveall test.

Build it now, complete code, don't skip any feather, any animation, or God Feather.
Kodari AI
KodariNov 8 at 4:48 pm 10
Featherinic
A permanent feather identity system for Paper 1.26.3 with cinematic roll animation. Players right-click a Feather Star to trigger a levitation roulette sequence that randomly assigns one of eight permanent feathers, each providing passive potion effects and active right-click powers. Crafting all eight feathers creates a God Feather with all effects, a devastating Nova ability, and a two-hit kill passive. Features configurable rarity weights, cooldowns, death-drop stealing, creative testing mode, and anti-exploit protections.
  1. Set up Featherinic’s plugin metadata, build configuration, and YAML defaults.

  2. Implement custom feather items, permanent effects, cooldowns, and player state.

  3. Add the roll cinematic, active powers, God Feather mechanics, and death handling.

  4. Add God Feather crafting, admin commands, testing mode, and GUI.

  5. Add the requested README and test checklist.

* Begin Patch * Update File: src/main/java/com/featherinic/FeatherListener.java @@ for (String id : FeatherManager.FEATHER_IDS) { ItemStack item = plugin.feathers().createTest(id);

  • Plain Text
           if (item != null) player.getInventory().addItem(item);
    
  • Plain Text
           if (item != null) player.getInventory().addItem(item).values().forEach(left -> player.getWorld().dropItemNaturally(player.getLocation(), left));
       }
    

* End Patch

* Begin Patch * Update File: src/main/java/com/featherinic/FeatherListener.java @@ boolean creativeTest = player.getGameMode() == GameMode.CREATIVE && plugin.getConfig().getBoolean(“creative-testing.auto-give-on-creative-switch”, true); boolean restoredStar = plugin.feathers().restorePendingStar(player); if (creativeTest) giveAll(player);

  • Plain Text
           else if (!restoredStar) plugin.feathers().giveStarIfEligible(player);
    
  • else {

  • Plain Text
               plugin.tests().disable(player);
    
  • Plain Text
               plugin.feathers().removeTestItems(player);
    
  • Plain Text
               if (!restoredStar) plugin.feathers().giveStarIfEligible(player);
    
  • }

@@ boolean creativeTest = player.getGameMode() == GameMode.CREATIVE && plugin.getConfig().getBoolean(“creative-testing.auto-give-on-creative-switch”, true); boolean restoredStar = plugin.feathers().restorePendingStar(player); if (creativeTest) giveAll(player);

  • Plain Text
           else if (!restoredStar) plugin.feathers().giveStarIfEligible(player);
    
  • else {

  • Plain Text
               plugin.tests().disable(player);
    
  • Plain Text
               plugin.feathers().removeTestItems(player);
    
  • Plain Text
               if (!restoredStar) plugin.feathers().giveStarIfEligible(player);
    
  • }

* End Patch

Created the Featherinic plugin project with custom tagged Feather/God Feather items, weighted cinematic rolls, permanent inventory-bound effects, all eight active powers, God Feather combat and crafting, death drops/stealing, creative test mode, commands, and the 54-slot test lab.

Configuration is in config.yml, messages.yml, feathers.yml, and crafting.yml. README.md includes setup, configuration guidance, adding a feather, and the requested test checklist.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
20 1,987
src/main/java/com/featherinic/Featherinic.java
package com.featherinic;

import com.featherinic.commands.FeatherCommand;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;

public final class Featherinic extends JavaPlugin {
    private FeatherManager featherManager;
    private CooldownManager cooldownManager;
    private PermanentEffectManager permanentEffectManager;
    private GodFeatherManager godFeatherManager;
    private RollAnimationManager rollAnimationManager;
    private TestManager testManager;
    private FeatherPower featherPower;
    private CraftingManager craftingManager;
    private YamlConfiguration messagesConfig;
    private YamlConfiguration featherConfig;
    private YamlConfiguration craftingConfig;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("messages.yml", false);
        saveResource("feathers.yml", false);
        saveResource("crafting.yml", false);
        messagesConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml"));
        featherConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "feathers.yml"));
        craftingConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "crafting.yml"));
        featherManager = new FeatherManager(this);
        cooldownManager = new CooldownManager(this);
        permanentEffectManager = new PermanentEffectManager(this);
        godFeatherManager = new GodFeatherManager(this);
        testManager = new TestManager(this);
        featherPower = new FeatherPower(this);
        craftingManager = new CraftingManager(this);
        rollAnimationManager = new RollAnimationManager(this);
        FeatherListener listener = new FeatherListener(this);
        Bukkit.getPluginManager().registerEvents(listener, this);
        Bukkit.getPluginManager().registerEvents(godFeatherManager, this);
        Bukkit.getPluginManager().registerEvents(craftingManager, this);
        FeatherCommand command = new FeatherCommand(this);
        getCommand("featherinic").setExecutor(command);
        getCommand("featherinic").setTabCompleter(command);
        permanentEffectManager.start();
        craftingManager.registerRecipes();
    }

    @Override
    public void onDisable() {
        if (rollAnimationManager != null) rollAnimationManager.stopAll();
        if (permanentEffectManager != null) permanentEffectManager.clearAll();
        if (cooldownManager != null) cooldownManager.save();
    }

    public FeatherManager feathers() { return featherManager; }
    public CooldownManager cooldowns() { return cooldownManager; }
    public PermanentEffectManager permanentEffects() { return permanentEffectManager; }
    public GodFeatherManager god() { return godFeatherManager; }
    public RollAnimationManager rolls() { return rollAnimationManager; }
    public TestManager tests() { return testManager; }
    public FeatherPower power() { return featherPower; }
    public CraftingManager crafting() { return craftingManager; }
    public YamlConfiguration featherConfig() { return featherConfig; }
    public YamlConfiguration messagesConfig() { return messagesConfig; }
    public YamlConfiguration craftingConfig() { return craftingConfig; }

    public String message(String key) {
        return messagesConfig.getString("prefix", getConfig().getString("settings.prefix", "&6[Featherinic] &f")).replace('&', '§')
                + messagesConfig.getString(key, key).replace('&', '§');
    }

    public void reloadData() {
        reloadConfig();
        messagesConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml"));
        featherConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "feathers.yml"));
        craftingConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "crafting.yml"));
        craftingManager.registerRecipes();
    }
}