nemuisl
๐Ÿ“Ž 1 file 6,615 chars
๐Ÿ“„
pasted-code-1784724771375.txt
txt 190 lines
โ–ถ
==================================================
PLUGIN NAME
==================================================
Ashhollow Magic

==================================================
PLUGIN TYPE
==================================================
Standalone Paper 1.21.11 plugin.

Do NOT combine with:
- Ashhollow Kingdoms code
- Kingdom management
- Ruler system
- Relics
- Kingdom commands

This plugin ONLY handles:
- Origins
- Species
- Origin abilities
- Magic system
- Savior system

Create API support to connect with Ashhollow Kingdoms.

==================================================
MAGIC SYSTEM CORE
==================================================
Command: /magic

Players can open the magic menu.

Menu shows:
- Current origin
- Species description
- Advantages
- Disadvantages (or allergies/weaknesses)
- Passive abilities
- Active abilities
- Magic status
- Cooldowns

==================================================
ORIGIN SYSTEM
==================================================
When a new player joins:
- Do NOT automatically give Savior.
- Players choose their origin.
- Create an origin selection menu.

Each origin must display:
- Name
- Description
- Advantages
- Disadvantages (or allergies)
- Passive abilities
- Active ability

After selecting:
- Save origin permanently.
- Apply origin traits.
- Send kingdom information to Ashhollow Kingdoms API.

==================================================
ORIGIN LIST
==================================================
SHADOW KINGDOM
- Vampire: Night creature with blood magic. Advantages: stronger at night, fast movement. Disadvantages: weakened by sunlight, allergic to garlic. Passive: nocturnal. Active: Blood Strike.
- Shadeborn: Advantages: stealth bonus. Disadvantages: weak in bright light. Active: Shadow Meld.
- Nightfang: Advantages: enhanced senses. Disadvantages: weaker in daylight. Active: Predator Strike.
- Ravenfolk: Advantages: flight in darkness. Disadvantages: fragile wings in daylight. Active: Dark Flight.
- Warlock: Advantages: strong curses. Disadvantages: weak to holy magic. Active: Dark Curse.

NATURE KINGDOM
- Dryad: Advantages: healing allies. Disadvantages: weak to fire. Active: Nature Blessing.
- Sylvan Elf: Advantages: accurate ranged attacks. Disadvantages: fragile defense. Active: Forest Arrow.
- Dwarf: Advantages: strong resistance, mining ability. Disadvantages: slower movement. Passive: small size (scaled smaller). Active: Ancient Stone.
- Treantkin: Advantages: strong defense. Disadvantages: slow movement. Active: Ancient Roots.
- Nature Catkin: Advantages: agile movement. Disadvantages: weaker defense. Active: Spirit Pounce.

ICE KINGDOM
- Frostborn: Advantages: cold resistance. Disadvantages: weak to fire. Active: Frost Armor.
- Snow Elf: Advantages: accurate ice attacks. Disadvantages: fragile in heat. Active: Ice Lance.
- Crystalborn: Advantages: strong defense. Disadvantages: slow movement. Active: Crystal Barrier.
- Winter Wolfkin: Advantages: fast movement, strong bite. Disadvantages: weak in warm climates. Active: Frozen Fang.
- Glacier Giantkin: Advantages: huge strength, cold resistance. Disadvantages: slow movement. Passive: giant size (scaled larger). Active: Frozen Ground.

WATER KINGDOM
- Merfolk: Advantages: breathe underwater, swim faster, can also breathe on land. Disadvantages: weaker away from water. Passive: amphibious breathing. Active: Ocean Current.
- Siren: Advantages: charm enemies, heal allies. Disadvantages: weaker on land. Active: Ocean Song.
- Tideborn: Advantages: wave control. Disadvantages: weaker in dry areas. Active: Wave Control.
- Coralfolk: Advantages: strong defense. Disadvantages: slow on land. Active: Coral Shield.
- Abyssal Fisherkin: Advantages: deep sea vision. Disadvantages: weaker in sunlight. Active: Deep Sea Vision.

FIRE KINGDOM
- Emberkin: Advantages: strong fire attacks. Disadvantages: weak to water. Active: Flame Burst.
- Phoenixborn: Advantages: revive once upon death. Disadvantages: weak to shadow magic. Active: Phoenix Rebirth.
- Ifrit: Advantages: strong melee fire attacks. Disadvantages: weak to ice. Active: Inferno Hand.
- Ashwalker: Advantages: area fire damage. Disadvantages: weak to water. Active: Ash Storm.
- Magmaborn: Advantages: strong defense. Disadvantages: slow movement. Active: Magma Armor.

==================================================
MAGIC COMMANDS
==================================================
/magic โ†’ Open magic menu.
/magic origin โ†’ Choose origin.
/magic info โ†’ Show origin information.
/magic toggle โ†’ Enable or disable magic abilities.
/magic savior set  โ†’ Grant Savior.
/magic savior remove  โ†’ Remove Savior.

==================================================
SAVIOR SYSTEM
==================================================
Savior is NOT a selectable origin.
Only admins can grant Savior.

Permission: ashhollow.magic.savior

When Savior is granted:
- Remove previous origin abilities.
- Replace with Savior abilities.
- Mark player as Savior.

Savior abilities:
- Light of Ashhollow: Powerful light attack with particles.
- Savior Protection: Protect nearby allies.
- Divine Restoration: Heal allies and remove negative effects.
- Seal of the Savior: Ultimate sealing ability.

==================================================
MAGIC ACTIVATION
==================================================
Do NOT use ground hitting activation.

Use:
- Ability menu
- Keybind support (optional)
- Commands
- Magic Orb item โ†’ allows species switching and particle activation

Abilities require:
- Cooldowns
- Proper effects
- Permission checks
- Particle effects (configurable)

==================================================
KINGDOM CONNECTION
==================================================
Connect with Ashhollow Kingdoms API.

When origin is selected, send:
- Player UUID
- Origin name
- Kingdom element

Examples:
- Vampire โ†’ Shadow
- Dwarf โ†’ Nature
- Phoenixborn โ†’ Fire
- Merfolk โ†’ Water
- Frostborn โ†’ Ice

==================================================
DATA STORAGE
==================================================
Save:
- Player UUID
- Origin
- Abilities
- Magic enabled/disabled
- Savior status

==================================================
PLUGIN QUALITY
==================================================
Requirements:
- Paper 1.21.11 compatible
- Optimized
- No placeholder code
- No TODO
- Proper command registration
- Complete Java source code
- Particle effects for abilities
- Magic Orb for species switching
- Amphibious water species (land + water breathing)
- Giant species scaled larger
- Dwarf species scaled smaller
Kodari AI
KodariJul 22 at 12:55 pm 11
AshhollowMagic
A standalone Paper 1.21.11 magic and origin plugin for Ashhollow. Players choose from twenty-five elemental species across Shadow, Nature, Ice, Water, and Fire kingdoms, each with unique passive traits and active abilities. The plugin provides interactive magic and origin menus, cooldown-controlled abilities, configurable particle effects, Magic Orb species switching, Savior abilities for administrators, persistent player data, amphibious and size-changing species, and an API bridge for Ashhollow Kingdoms integration.
  1. Build the Paper plugin foundation and persistent player data.

  2. Implement origins, passive traits, active abilities, cooldowns, and Savior powers.

  3. Add magic menus, origin selection, commands, and the Magic Orb.

  4. Add kingdom API support, configuration, permissions, and event handling.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
23 1,549
src/main/java/com/ashhollow/magic/AshhollowMagic.java
package com.ashhollow.magic;

import com.ashhollow.magic.command.MagicCommand;
import com.ashhollow.magic.data.MagicStorage;
import com.ashhollow.magic.gui.GUIListener;
import com.ashhollow.magic.gui.GUIManager;
import com.ashhollow.magic.kingdom.AshhollowMagicApi;
import com.ashhollow.magic.listener.MagicListener;
import com.ashhollow.magic.service.MagicService;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class AshhollowMagic extends JavaPlugin {
    private MagicStorage storage;
    private MagicService magicService;
    private GUIManager guiManager;
    private AshhollowMagicApi api;

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

        this.storage = new MagicStorage(this);
        this.magicService = new MagicService(this, storage);
        this.guiManager = new GUIManager();
        this.api = new AshhollowMagicApi(magicService);

        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new MagicListener(this, magicService, guiManager), this);

        MagicCommand magicCommand = new MagicCommand(this, magicService, guiManager);
        getCommand("magic").setExecutor(magicCommand);
        getCommand("magic").setTabCompleter(magicCommand);

        Bukkit.getScheduler().runTaskTimer(this, () -> {
            Bukkit.getOnlinePlayers().forEach(magicService::applyPassiveEffects);
        }, 20L, 100L);
    }

    @Override
    public void onDisable() {
        if (storage != null) {
            storage.saveAll();
        }
    }

    public MagicService getMagicService() {
        return magicService;
    }

    public AshhollowMagicApi getApi() {
        return api;
    }
}