Aiden Williams
๐Ÿ“Ž 1 file 6,280 chars
๐Ÿ“„
pasted-code-1793478581756.txt
txt 176 lines
โ–ถ
1. Helmet โ€“ Abyssal Crown
Enchantments
- Protection IV
Passive Ability โ€“ Ocean's Blessing
Permanent Water Breathing.
1.5x faster movement in water.
Active Ability โ€“ Abyssal Curse
Targets the closest player.
Applies Mining Fatigue I.
Applies Slowness III.
Suggested cooldown: 45 seconds.
Description:
"Born from the deepest depths of the ocean, this crown carries the curse of the forgotten sea. Those who stand against its wearer will feel the crushing weight of the abyss."
2. Chestplate โ€“ Demolition Core
Enchantments
Protection IV
Blast Protection IV
Special Protection
- Does not affect Wind Charge knockback.
Active Ability โ€“ Detonation
Charges for 2.5 seconds.
Releases a powerful explosion.
Deals 3.5 hearts of damage.
Applies Slowness II to the wearer for 5 seconds.
60-second cooldown.
Description:
"Forged in the heart of a dying star, this chestplate holds an unstable power. With every detonation, its wearer sacrifices their own mobility to unleash devastating destruction."
3. Leggings โ€“ Phantom Greaves
Enchantments
- Protection IV
Passive Ability โ€“ Phantom Step
10% increased movement speed.
Reduces fall damage.
Active Ability โ€“ Shadow Dash
Dashes the wearer forward.
Grants Speed II for 3 seconds.
45-second cooldown.
Description:
"Once worn by warriors who vanished without a trace, these greaves bend the shadows around their wearer. No enemy can easily catch what they cannot see."
4. Boots โ€“ Webwalkers
Enchantments
Protection IV
Feather Falling IV
Passive Ability โ€“ Webbed
- Permanent Weaving effect.
Active Ability โ€“ Spider Trap
Places cobwebs around the wearer.
Makes the wearer completely invulnerable for 3 seconds.
60-second cooldown.
Description:
"Crafted from the silk of an ancient spider, these boots command the very webs that once trapped their creators. For a brief moment, their wearer becomes untouchable."
Full Armor Overview
Armor
Main Ability
Cooldown
Abyssal Crown
Abyssal Curse
45s
Demolition Core
Detonation
60s
Phantom Greaves
Shadow Dash
45s
Webwalkers
Spider Trap
60s

Full Set Lore
"Four relics, four powers, and four paths to domination. Each piece was forged with a different force of nature. Together, they create a power that few on this server could ever challenge."

โšก GOD WEAPONS โ€“ SMP PLUGIN
Legendary Crafting System
Extremely Rare
Crafting System
When a player places all 4 pieces of armor (Helmet, Chestplate, Leggings, and Boots) into a crafting table, they unlock the ability to craft ONE God Weapon.
Once the player attempts to craft it, a custom GUI opens with 5 different weapon choices.
Players can only choose ONE weapon. Once crafted, the other four options become unavailable.
1. ๐Ÿน God Bow โ€“ Archer's Wrath
Passive + Active Ability
Passive Perks
Shoots 1.5x faster than a normal bow.
Shoots 2 arrows simultaneously with every shot.
Ability: Archer's Range
When activated:
Shoots 3 arrows simultaneously.
Piercing IV.
Quick Charge II (crossbow-style ability).
Lasts 14 seconds.
Cooldown: 90 seconds.
GUI Description:
A bow blessed by the gods. Its arrows strike faster and in greater numbers. Unleash Archer's Range to overwhelm your enemies with a storm of piercing arrows.
2. โš”๏ธ God Sword โ€“ Warrior's Confidence
Combat Ability
Ability: Warrior's Confidence
When activated, you receive:
Regeneration II
Resistance I
Speed II
Duration: 10 seconds
Exhaustion:
- After the ability ends, you receive Slowness I for 20 seconds.
Cooldown: 90 seconds.
GUI Description:
A sword forged for warriors who refuse to fall. Gain increased strength, speed, and survivability during battle. But remember, every warrior eventually becomes exhausted.
3. ๐Ÿช“ God Axe โ€“ Berserker's Wrath
High Risk / High Reward
Passive Perk
- Permanent Haste I while holding the axe.
Ability: Berserker's Wrath
When activated:
Haste II
Speed II
Sharpness IV
Duration: 2.5 seconds
Drawback:
- After the ability ends, your maximum health decreases to 8 hearts.
GUI Description:
A weapon powered by pure destruction. Unleash a short burst of overwhelming power, gaining incredible speed and strength. But the power comes at a cost.
4. ๐Ÿ”ฑ God Spear โ€“ Heaven's Descent

Mobility Weapon
Passive Perk
- Lunge IV. sharp 5
Ability: Heaven's Descent
When activated:
Launch yourself up to 15 blocks into the air.
Can be used to escape combat, chase enemies, or gain height during fights.
Cooldown: 5 seconds.
GUI Description:
A spear blessed with the power of the heavens. Its wielder can launch themselves into the sky, gaining an unmatched advantage in movement and positioning.
5. โ›๏ธ God Pickaxe โ€“ Earth's Dominance
Mining + Combat Weapon
Passive Perks
Efficiency VI.
Fortune IV.
Sword-like attack speed.
Sword-like attack damage.
Ability: Earth's Dominance
When activated:
Mining speed increases by 2x.
Allows you to mine blocks extremely quickly.
Suggested Duration: 10 seconds.
Cooldown: 60 seconds.
GUI Description:
A pickaxe created to rule over the earth itself. Mine through the toughest materials with incredible speed while retaining the combat power of a sword.
GUI Design
When the player puts all four armor pieces into the crafting table, this menu appears:

Each weapon has its own colored glow and description.
Weapon
GUI Glow
God Bow
Yellow
God Sword
Red
God Axe
Orange
God Spear
Blue
God Pickaxe
Green

Clicking a weapon opens a confirmation screen showing all perks, abilities, cooldowns, and drawbacks.
Important Plugin Rules
Each player can only craft ONE God Weapon.
God Wea
pons cannot be duplicated.
God Weapons cannot be crafted again using the same armor.
If a player dies, the weapon drops normally (unless configured otherwise).
All abilities have individual cooldowns.
All weapons have custom names, lore, particles, and sounds.
The plugin should save which weapon each player selected, even after restarting the server.
One balancing recommendation: The Axe's 8-heart drawback should be permanent until the player dies or uses a special recovery method. Otherwise, the ability would be extremely powerful without much risk.
This would make God Weapons a major progression system for your SMP, with every player having to choose their own fighting style.
Kodari AI
KodariOct 31 at 8:40 pm 1
GodWeaponForge
Creates a legendary armor and weapon system where players combine four custom armor pieces in a crafting table to unlock a GUI for selecting one of five unique God Weapons. Each weapon features distinct passive perks, active abilities with cooldowns, and drawbacks. The plugin tracks player weapon selections persistently across restarts, prevents duplication, and implements all armor abilities including water breathing, detonation, shadow dash, and spider trap with custom particles, sounds, and MiniMessage-formatted lore.

Iโ€™ll create a Paper plugin with persistent one-weapon selection, armor-piece crafting menus, relic abilities and passives, and an admin command for granting the armor.

Created the GodWeapons Paper plugin with the five-weapon selection GUI, persistent one-choice-per-player tracking, relic armor passives and abilities, individual cooldowns, and /godweapons givearmor for admins.

Armor abilities use sneak + right-click; hotbar slots 1โ€“4 choose helmet, chestplate, leggings, and boots. Weapon abilities use right-click. Use /godweapons help in-game for the controls.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
4 1,009
src/main/java/com/kodari/godweapons/GodWeaponsPlugin.java
package com.kodari.godweapons;

import com.cryptomorin.xseries.XAttribute;
import com.cryptomorin.xseries.XEnchantment;
import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import com.cryptomorin.xseries.XSound;
import com.cryptomorin.xseries.particles.XParticle;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.potion.PotionEffect;
import org.bukkit.util.Vector;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;

public final class GodWeaponsPlugin extends JavaPlugin implements Listener, CommandExecutor, TabCompleter {
    private static final String FULL_SET_LORE = "Four relics, four powers, and four paths to domination. Together, they create a power few could challenge.";
    private final Map<UUID, WeaponType> selectedWeapons = new HashMap<>();
    private final Map<UUID, Inventory> pendingCrafting = new HashMap<>();
    private final Map<UUID, WeaponType> menuSelections = new HashMap<>();
    private final Map<String, Long> cooldowns = new HashMap<>();
    private final Map<UUID, Long> invulnerableUntil = new HashMap<>();
    private final Map<UUID, Long> bowAbilityUntil = new HashMap<>();
    private final Map<UUID, Long> axeAbilityUntil = new HashMap<>();
    private final Set<UUID> weakenedPlayers = new HashSet<>();
    private final NamespacedKey itemKey = new NamespacedKey(this, "god_item");
    private final NamespacedKey phantomSpeedKey = new NamespacedKey(this, "phantom_step");
    private final NamespacedKey waterSpeedKey = new NamespacedKey(this, "abyssal_swim");
    private File stateFile;
    private YamlConfiguration state;

    @Override
    public void onEnable() {
        stateFile = new File(getDataFolder(), "players.yml");
        loadState();
        Bukkit.getPluginManager().registerEvents(this, this);
        getCommand("godweapons").setExecutor(this);
        getCommand("godweapons").setTabCompleter(this);
        Bukkit.getScheduler().runTaskTimer(this, this::applyPassives, 20L, 20L);
    }

    @Override
    public void onDisable() {
        saveState();
        for (Player player : Bukkit.getOnlinePlayers()) {
            removeModifier(player, phantomSpeedKey);
            removeModifier(player, waterSpeedKey);
        }
    }

    private void loadState() {
        if (!stateFile.exists()) {
            state = new YamlConfiguration();
            return;
        }
        state = YamlConfiguration.loadConfiguration(stateFile);
        for (String key : state.getConfigurationSection("selected") == null
                ? Set.<String>of() : state.getConfigurationSection("selected").getKeys(false)) {
            try {
                WeaponType type = WeaponType.fromId(state.getString("selected." + key));
                if (type != null) {
                    selectedWeapons.put(UUID.fromString(key), type);
                }
            } catch (IllegalArgumentException ignored) {
            }
        }
        for (String key : state.getStringList("weakened")) {
            try {
                weakenedPlayers.add(UUID.fromString(key));
            } catch (IllegalArgumentException ignored) {
            }
        }
    }

    private void saveState() {
        if (state == null) {
            state = new YamlConfiguration();
        }
        state.set("selected", null);
        selectedWeapons.forEach((uuid, weapon) -> state.set("selected." + uuid, weapon.getId()));
        state.set("weakened", weakenedPlayers.stream().map(UUID::toString).toList());
        try {
            if (!getDataFolder().exists()) {
                getDataFolder().mkdirs();
            }
            state.save(stateFile);
        } catch (IOException exception) {
            getLogger().severe("Could not save player selections: " + exception.getMessage());
        }
    }

    @EventHandler
    public void onInteract(PlayerInteractEvent event) {
        if (event.getHand() == null || event.getHand().name().equals("OFF_HAND")) {
            return;
        }
        Action action = event.getAction();
        if (action != Action.RIGHT_CLICK_AIR && action != Action.RIGHT_CLICK_BLOCK) {
            return;
        }
        Player player = event.getPlayer();
        if (player.isSneaking() && tryArmorAbility(player)) {
            event.setCancelled(true);
            return;
        }
        WeaponType weapon = weaponType(event.getItem());
        if (weapon != null) {
            event.setCancelled(true);
            activateWeapon(player, weapon);
        }
    }

    private boolean tryArmorAbility(Player player) {
        int slot = player.getInventory().getHeldItemSlot();
        String piece = switch (slot) {
            case 0 -> "helmet";
            case 1 -> "chestplate";
            case 2 -> "leggings";
            case 3 -> "boots";
            default -> null;
        };
        if (piece == null || !hasArmorPiece(player, piece)) {
            return false;
        }
        switch (piece) {
            case "helmet" -> abyssalCurse(player);
            case "chestplate" -> detonation(player);
            case "leggings" -> shadowDash(player);
            case "boots" -> spiderTrap(player);
            default -> {
                return false;
            }
        }
        return true;
    }

    private void abyssalCurse(Player player) {
        if (!startCooldown(player, "armor_helmet", 45)) {
            return;
        }
        Player target = Bukkit.getOnlinePlayers().stream()
                .filter(other -> !other.equals(player) && other.getWorld().equals(player.getWorld()))
                .filter(other -> other.getLocation().distanceSquared(player.getLocation()) <= 256)
                .min((a, b) -> Double.compare(a.getLocation().distanceSquared(player.getLocation()),
                        b.getLocation().distanceSquared(player.getLocation())))
                .orElse(null);
        if (target == null) {
            player.sendMessage("&cNo player is close enough to curse.");
            return;
        }
        applyPotion(target, "MINING_FATIGUE", 200, 0);
        applyPotion(target, "SLOWNESS", 200, 2);
        playSound(target, "ENTITY_ELDER_GUARDIAN_CURSE");
        player.sendMessage("&3Abyssal Curse struck " + target.getName() + ".");
    }