puranxd

--- ๐Ÿ“Ž Attached 1 file(s):

File: pasted-code-1789727376181.txt

txt
# โš”๏ธ PURANXD GODWEAPONS

## Next-Level Custom Weapons Framework โ€” Complete Plugin Build Prompt

You are an expert Minecraft Paper plugin developer and software architect.

I want you to build a **complete, production-ready Minecraft Paper plugin** called:

**PuranXD-GodWeapons**

This is NOT a simple example plugin.

Build a real, reusable **Custom Weapons Framework** where I can create unlimited custom weapons, custom items, custom powers/abilities, and custom recipes through configuration files without editing Java source code every time.

I want the final project to be ready to open in **VS Code**, build with **Maven**, produce a `.jar`, and install directly into a Paper Minecraft server.

---

# PART 1 โ€” TARGET

Use:

- Java
- Maven
- Paper API
- YAML configuration
- PersistentDataContainer
- Adventure API / MiniMessage where appropriate

Target a modern Paper Minecraft version.

At the beginning of your response, clearly state:
text TARGET MINECRAFT VERSION:

JAVA VERSION:

PAPER API VERSION:

MAVEN VERSION:

text
plugins/PuranXD-GodWeapons/weapons/sky_relic.yml
๐Ÿ“Ž 1 file 17,701 chars
๐Ÿ“„
pasted-code-1789727414840.txt
txt 1277 lines
โ–ถ
# โš”๏ธ PURANXD GODWEAPONS

## Next-Level Custom Weapons Framework โ€” Complete Plugin Build Prompt

You are an expert Minecraft Paper plugin developer and software architect.

I want you to build a **complete, production-ready Minecraft Paper plugin** called:

**PuranXD-GodWeapons**

This is NOT a simple example plugin.

Build a real, reusable **Custom Weapons Framework** where I can create unlimited custom weapons, custom items, custom powers/abilities, and custom recipes through configuration files without editing Java source code every time.

I want the final project to be ready to open in **VS Code**, build with **Maven**, produce a `.jar`, and install directly into a Paper Minecraft server.

---

# PART 1 โ€” TARGET

Use:

- Java
- Maven
- Paper API
- YAML configuration
- PersistentDataContainer
- Adventure API / MiniMessage where appropriate

Target a modern Paper Minecraft version.

At the beginning of your response, clearly state:

```text
TARGET MINECRAFT VERSION:
JAVA VERSION:
PAPER API VERSION:
MAVEN VERSION:

```

Choose versions that are actually compatible with each other.

Do not use imaginary APIs.

Do not provide pseudocode.

Do not leave TODO implementations.

Every required class and file must be complete.

---

# PART 2 โ€” CORE IDEA

The plugin must work like a framework.

I want to be able to create a weapon by adding a YAML file:

```text
plugins/PuranXD-GodWeapons/weapons/sky_relic.yml

```

and configuring:

```yaml
id: sky_relic
name: "Sky Relic"

material: NETHERITE_SWORD

rarity: MYTHIC

damage: 18

abilities:
  - sky_strike
  - thunder_dash

```

I should NOT have to create a new Java class for every weapon.

The Java code provides the engine.

YAML provides the weapon definitions.

---

# PART 3 โ€” COMPLETE WEAPON SYSTEM

Each weapon must support:

- Unique ID
- Custom name
- Custom lore
- Base material
- Damage
- Attack speed
- Durability
- Enchantments
- Item flags
- Unbreakable
- Custom attributes
- Rarity
- Custom model/texture information
- Passive abilities
- Active abilities
- Cooldowns
- Custom recipe
- Custom sounds
- Custom particles
- Permission requirements

Use PersistentDataContainer to identify custom items.

NEVER identify weapons only by:

- Display name
- Lore
- Material

---

# PART 4 โ€” CUSTOM POWER / ABILITY ENGINE

This is one of the MOST IMPORTANT systems.

Create a real modular **Ability Engine**.

Every weapon can have multiple powers.

Example:

```yaml
abilities:

  sky_strike:
    type: LIGHTNING_STRIKE
    trigger: RIGHT_CLICK
    cooldown: 8
    damage: 25
    radius: 5

  thunder_dash:
    type: DASH
    trigger: SHIFT_RIGHT_CLICK
    cooldown: 12
    distance: 8

```

The ability engine must support:

## Triggers

```text
RIGHT_CLICK
LEFT_CLICK
SHIFT_RIGHT_CLICK
SHIFT_LEFT_CLICK
DROP
SWAP_HAND
ATTACK
PASSIVE

```

Create a proper internal ability interface/system.

Example architecture:

```text
Ability
AbilityContext
AbilityManager
CooldownManager
AbilityRegistry

```

Abilities must be registered by ID.

---

# PART 5 โ€” BUILT-IN CUSTOM POWERS

Implement these as REAL working abilities.

## Combat

```text
LIGHTNING_STRIKE
AREA_DAMAGE
CHAIN_LIGHTNING
GROUND_SLAM
KNOCKBACK
PROJECTILE
METEOR
EXPLOSION

```

## Movement

```text
DASH
TELEPORT
LEAP
LAUNCH

```

## Elemental

```text
FIRE_ATTACK
ICE_ATTACK
FREEZE
WATER_BURST

```

## Player

```text
HEAL
SPEED
RESISTANCE
REGENERATION
LEVITATION
NIGHT_VISION

```

## Utility

```text
PARTICLE_BURST
SOUND
SUMMON

```

Every ability should have configurable parameters.

Example:

```yaml
damage: 25
radius: 5
duration: 4
cooldown: 10
range: 15
amount: 30

```

---

# PART 6 โ€” PASSIVE POWERS

Support passive abilities.

Example:

```yaml
passives:

  speed:
    type: SPEED
    amplifier: 1

  resistance:
    type: RESISTANCE
    amplifier: 1

  night_vision:
    type: NIGHT_VISION

```

Passive effects must NOT stack every tick.

Correctly manage:

- Applying effects
- Removing effects
- Switching weapons
- Death
- Respawn
- Disconnect
- Plugin reload

---

# PART 7 โ€” POWER COMBINATIONS

Allow multiple powers on the same weapon.

Example:

```yaml
abilities:

  first:
    type: LIGHTNING_STRIKE

  second:
    type: DASH

  third:
    type: GROUND_SLAM

```

Each power has its own cooldown.

Also support an optional global weapon cooldown.

Example:

```yaml
cooldown:
  global: 2

abilities:
  first:
    cooldown: 8
  second:
    cooldown: 5

```

---

# PART 8 โ€” TARGETING SYSTEM

Create a reusable targeting system.

Abilities must be able to target:

```text
SELF
SINGLE_TARGET
NEARBY_ENTITIES
NEARBY_PLAYERS
HOSTILE_MOBS
ALL_ENTITIES

```

Allow:

```yaml
radius: 6
range: 15
max-targets: 10

```

Prevent the player from accidentally damaging themselves unless explicitly configured.

---

# PART 9 โ€” CUSTOM RECIPE ENGINE

Create a complete custom recipe system.

This must support:

## Shaped recipes

```yaml
recipe:
  enabled: true
  type: SHAPED

  shape:
    - "ABA"
    - "CDC"
    - "AEA"

  ingredients:

    A:
      material: NETHERITE_INGOT

    B:
      material: NETHER_STAR

    C:
      material: DIAMOND_BLOCK

    D:
      material: HEART_OF_THE_SEA

    E:
      material: END_CRYSTAL

```

## Shapeless recipes

```yaml
recipe:
  enabled: true
  type: SHAPELESS

  ingredients:
    - DIAMOND
    - NETHER_STAR
    - CUSTOM:void_core

```

---

# PART 10 โ€” CUSTOM ITEM INGREDIENTS

This is REQUIRED.

A custom item must be usable as a recipe ingredient.

Example:

```text
celestial_shard
void_core
shadow_crystal
ancient_heart

```

Recipe:

```yaml
ingredients:

  A:
    custom-item: celestial_shard

  B:
    custom-item: void_core

```

Do NOT identify custom ingredients using display names.

Use PDC/custom IDs.

---

# PART 11 โ€” CUSTOM ITEM SYSTEM

Create:

```text
items/

```

Example:

```text
items/celestial_shard.yml

```

```yaml
id: celestial_shard

name: "Celestial Shard"

material: AMETHYST_SHARD

rarity: EPIC

lore:
  - "A fragment of celestial energy."

```

Custom items must support:

- Custom ID
- Name
- Lore
- Material
- Rarity
- Enchantments
- PDC
- Texture reference
- Recipe usage
- Commands

---

# PART 12 โ€” CUSTOM WEAPON RECIPE + POWER TOGETHER

Provide a fully working example weapon:

## SKY RELIC

It must have:

### Stats

```text
Damage: 18
Rarity: MYTHIC

```

### Powers

```text
RIGHT CLICK
โ†’ Sky Strike

SHIFT + RIGHT CLICK
โ†’ Thunder Dash

```

### Passive

```text
Holding weapon
โ†’ Speed I

```

### Recipe

Use:

```text
Nether Star
Netherite
Diamond Blocks
Heart of the Sea
Celestial Shard

```

This example must actually work.

---

# PART 13 โ€” COOLDOWN SYSTEM

Create a proper cooldown manager.

Cooldowns should be stored per:

```text
Player UUID
+
Ability ID

```

Example:

```text
Player A
Sky Strike โ†’ 8 seconds
Thunder Dash โ†’ 12 seconds

```

Do not use blocking Thread.sleep.

Do not create unnecessary tasks.

Show configurable cooldown messages.

Example:

```yaml
messages:
  cooldown: "Ability is on cooldown for 
Kodari AI
KodariSep 18 at 10:38 am 3
GodWeaponsFramework
A config-driven custom weapons framework for Paper Minecraft servers. Players define weapons, items, abilities, recipes, and textures entirely through YAML files without writing Java. The engine provides a modular ability system with triggers, cooldowns, passives, targeting, particles, and sounds. It includes a custom item system for recipe ingredients, a rarity system, an admin GUI, resource pack generation, and robust error handling. All items are identified via PersistentDataContainer for exploit protection. Commands like /gweapon give, list, info, recipe, reload, menu, and generatepack manage the framework. The plugin auto-creates folder structures, supports shaped and shapeless recipes, and safely handles missing textures or invalid configs.

TARGET MINECRAFT VERSION: 1.21.4
JAVA VERSION: 21
PAPER API VERSION: 1.21.4-R0.1-SNAPSHOT
MAVEN VERSION: 3.9.9

  1. Create the Maven/Paper project metadata and default configuration.

  2. Create the configuration-driven item, weapon, ability, cooldown, recipe, and resource-pack engines.

  3. Create listeners, commands, tab completion, and the admin menu.

  4. Add working Sky Relic/Celestial Shard examples and the Windows/VS Code README.

TARGET MINECRAFT VERSION: 1.21.4
JAVA VERSION: 21
PAPER API VERSION: 1.21.4-R0.1-SNAPSHOT
MAVEN VERSION: 3.9.9

Created the complete PuranXD-GodWeapons Maven project with:

  • Paper plugin metadata and permissions

  • Configuration-driven weapons and custom items

  • PersistentDataContainer item identification

  • Sky Relic and Celestial Shard examples

  • Ability engine with cooldowns

  • Combat, movement, elemental, player, and utility abilities

  • Passive potion effects

  • Shaped and shapeless recipes

  • Custom-item recipe ingredients

  • /gweapon commands and tab completion

  • Admin weapon menu

  • Resource-pack generation and optional texture support

  • Reload handling

  • Error-tolerant YAML loading

  • Complete README with Windows, VS Code, PowerShell, Maven, Paper, configuration, texture, and Void Blade tutorials

Build with:

Powershell
mvn clean package

The resulting plugin will be located at:

Plain Text
target/PuranXD-GodWeapons.jar
Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
24 671
src/main/java/com/puranxd/godweapons/PuranXDGodWeapons.java
package com.puranxd.godweapons;

import com.puranxd.godweapons.ability.AbilityManager;
import com.puranxd.godweapons.command.GodWeaponCommand;
import com.puranxd.godweapons.command.GodWeaponTabCompleter;
import com.puranxd.godweapons.cooldown.CooldownManager;
import com.puranxd.godweapons.item.ItemManager;
import com.puranxd.godweapons.listener.GameplayListener;
import com.puranxd.godweapons.listener.PassiveListener;
import com.puranxd.godweapons.recipe.RecipeManager;
import com.puranxd.godweapons.resourcepack.ResourcePackManager;
import com.puranxd.godweapons.weapon.WeaponManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class PuranXDGodWeapons extends JavaPlugin {
    private ItemManager itemManager;
    private WeaponManager weaponManager;
    private CooldownManager cooldownManager;
    private AbilityManager abilityManager;
    private RecipeManager recipeManager;
    private ResourcePackManager resourcePackManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        getDataFolder().toPath().resolve("weapons").toFile().mkdirs();
        getDataFolder().toPath().resolve("items").toFile().mkdirs();
        getDataFolder().toPath().resolve("assets").toFile().mkdirs();
        getDataFolder().toPath().resolve("generated-resourcepack").toFile().mkdirs();
        saveBundledFile("weapons/sky_relic.yml");
        saveBundledFile("items/celestial_shard.yml");

        cooldownManager = new CooldownManager();
        itemManager = new ItemManager(this);
        weaponManager = new WeaponManager(this, itemManager);
        abilityManager = new AbilityManager(this, cooldownManager);
        recipeManager = new RecipeManager(this, itemManager, weaponManager);
        resourcePackManager = new ResourcePackManager(this, itemManager, weaponManager);
        reloadSystems();

        GodWeaponCommand command = new GodWeaponCommand(this);
        getCommand("gweapon").setExecutor(command);
        getCommand("gweapon").setTabCompleter(new GodWeaponTabCompleter(this));
        Bukkit.getPluginManager().registerEvents(new GameplayListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PassiveListener(this), this);
        getLogger().info("Loaded " + weaponManager.getWeapons().size() + " weapons and " + itemManager.getItems().size() + " custom items.");
    }

    public void reloadSystems() {
        reloadConfig();
        itemManager.load();
        weaponManager.load();
        recipeManager.reload();
        resourcePackManager.prepare();
    }

    private void saveBundledFile(String path) {
        if (!getDataFolder().toPath().resolve(path).toFile().exists()) saveResource(path, false);
    }

    public ItemManager getItemManager() { return itemManager; }
    public WeaponManager getWeaponManager() { return weaponManager; }
    public CooldownManager getCooldownManager() { return cooldownManager; }
    public AbilityManager getAbilityManager() { return abilityManager; }
    public RecipeManager getRecipeManager() { return recipeManager; }
    public ResourcePackManager getResourcePackManager() { return resourcePackManager; }
}