H

Shrine SMP System Definitions Ps = Passive Ability Ab1 = Ability 1 Ab2 = Ability 2 Csm = Custom Model Data

Each shrine is represented by a Book with Custom Model Data (Csm).

Shrines Frost Shrine (Csm: 1)

Passive:

Deal increased damage while standing on ice.

Ability 1:

Freeze a targeted player in place for 5 seconds.

Ability 2:

Shoot a large ice block projectile dealing 3.5 hearts of damage.

Magma Shrine (Csm: 2)

Passive:

Immune to fire damage and explosions.

Ability 1:

Create a fire particle explosion around the player.

Ability 2:

Summon falling magma blocks from the sky.

Poseidon Shrine (Csm: 3)

Passive:

Infinite Dolphin’s Grace and Conduit Power.

Trident damage is doubled.

Ability 1:

Shoot a wave of water particles dealing 3.5 hearts of damage.

Ability 2:

Throw a large trident projectile dealing 4 hearts of damage.

Darkness Shrine (Csm: 4)

Passive:

Immune to Wardens and Sculk Shriekers.

Ability 1:

Blind all players within a 15-block radius for 10 seconds.

Ability 2:

Fire a Warden sonic boom attack dealing 4.5 hearts of damage.

Wind Shrine (Csm: 5)

Passive:

Immune to Breeze mobs and enemy wind charges.

No fall damage.

Ability 1:

Dash 8 blocks forward in the direction the player is facing.

Ability 2:

Create a hurricane.

Players inside the hurricane are forced to spin in a circular motion.

Magician Shrine (Csm: 6)

Passive:

Permanent Luck I effect.

Ability 1:

Convert blocks into fake blocks (illusion blocks).

Ability 2:

Summon a large fist from the ground dealing 4.5 hearts of damage.

Immortality Shrine (Csm: 7)

Passive:

Every 2 player kills increases the chance by 5% to receive a backup Totem of Undying.

The backup totem activates even if the player does not hold one in main hand or offhand.

Ability 1:

Rapidly drain the enemy’s health and saturation.

Ability 2:

Instantly trigger the enemy’s Totem of Undying.

If the enemy has no totem, deal 5 hearts of damage instead.

Storm Shrine (Csm: 8)

Passive:

Every 8 hits summons lightning.

Each hit during lightning has a chance to grant random buffs.

Ability 1:

Fire a lightning beam dealing 3.5 hearts of damage.

Ability 2:

Summon a thunderstorm that strikes lightning every 3 seconds.

Void Shrine (Csm: 9)

Passive:

Take reduced damage from potions and magic.

Ability 1:

Launch movable blocks (only blocks that can be pushed by pistons).

Ability 2:

Create a black hole that pulls nearby entities inward.

Life Shrine (Csm: 10)

Passive:

Permanent Regeneration I.

Ability 1:

Steal the next incoming damage from your enemy (maximum 5 hearts).

Ability 2:

Reduce enemy health to 4 hearts and grant them Resistance I.

Ender Shrine (Csm: 11)

(Only obtainable through commands)

Passive:

All players within 25 blocks glow.

Ability 1:

Instantly teleport 15 blocks forward in the direction the player is facing.

Ability 2:

Attacks ignore 25% of enemy armor.

Wealth Shrine (Csm: 12)

Passive:

Grants Hero of the Village II.

Side Passive:

Unlocks the /ei command (exclusive inventory).

Ability 1:

Apply Unfortunate: enemy items have a 50% chance to fail when used.

Ability 2:

Lock the enemy’s held item, preventing item switching.

Resistance Shrine (Csm: 13)

Passive:

Permanent Regeneration I.

Ability 1:

Become invincible for 5 seconds.

Ability 2:

Release a shockwave with 15 block radius, pushing players 7 blocks away.

Commands Shrine Abilities

/ab1

Activates Ability 1 of the player’s shrine.

/ab2

Activates Ability 2 (consumes the second shrine ability).

Shrine System

/shrinegive <Shrine | 2ndShrine | END>

Shrine

Gives a Mace named “ꜱʜʀɪɴᴇ'ꜱ ᴍᴀᴄᴇ” (blue text).

Can disable a shrine for 30 seconds.

Can dash twice (15 blocks each dash).

2ndShrine

Grants the second shrine ability item.

END

Starts the End Fight event.

Rewards the Ender Shrine consumable item.

Info INVENTORY GUI

/info

Opens a INVENTORY GUI explaining /shrinegive items.

Trust System

/trust <add | remove | list> <player>

Trusted players ignore shrine abilities used by you.

Shrine Reroll

/reroll <player>

Gives a reroll book.

Consuming the book rerolls the player's shrine.

Ender Shrine cannot be obtained from reroll.

Set Shrine (Admin)

/setshrine <player> <shrine>

Available shrines:

Frost Magma Poseidon Darkness Wind Magician Immortality Storm Void Life Ender Wealth Resistance

/start <1s | 1m | 1h>

Disables PvP for the specified real-life time.

Rolls all player shrines randomly.

Players are launched into the air and receive Slow Falling after being assigned their shrine.

Withdraw Ability

/withdraw

Withdraws the second shrine ability into an item.

Does nothing if the player does not have a second ability.

Wealth Shrine Command

/ei

Opens a secondary inventory.

Only usable by players with the Wealth Shrine.

Kodari AI
KodariApr 23 at 11:34 am 65,594 (v2)
ShrineSMP
A shrine-based ability system for SMP gameplay. Players receive one of 13 elemental shrines (Frost, Magma, Poseidon, Darkness, Wind, Magician, Immortality, Storm, Void, Life, Ender, Wealth, Resistance), each with a passive, Ability 1, and a consumable Ability 2. Features include a shrine mace combat item, a trust system, an exclusive Wealth inventory, admin shrine management, PvP phase control, a reroll system, and a special End Fight event.

Plan:

  • 13 shrine ability classes extending ShrineAbility (passives via tick task + event hooks, ab1/ab2 via commands)

  • ShrineListener centralizes all event delegation (damage, projectiles, item use, death, etc.)

  • Inventory GUI framework for /info and /ei (Wealth exclusive inventory)

  • PlayerData (Lombok) tracks shrine, second ability charge, trust list, kill counts, active flags

  • All 10 commands wired through a ShrineSMP main class with ShrineManager + PlayerDataManager

All 39 files are created. Here’s a summary of what was built:

  • 13 shrine implementations each with passive (tick-based), Ab1 (cooldown-gated), and Ab2 (consumable) — covering freeze, fire, water, darkness, wind, illusion, life drain, storm, void, healing, teleport, wealth, and resistance mechanics

  • ShrineListener handles all events: damage passives, Ender armor pierce, mace shrine-disable hits, custom projectile damage, item interaction (mace dash, second ability restore, reroll, End Fight, Ender consumable), Wealth lock/unfortunate, and kill events for Immortality

  • Inventory GUI framework with InfoGUI (explains the 3 special items) and ExclusiveInventoryGUI (Wealth /ei — allows full item interaction and auto-saves to PlayerData)

  • 10 commands wired to their executors; /start rolls all players randomly, launches them with Slow Falling, and re-enables PvP after the specified duration

  • Trust system checks are applied in every ability and projectile hit before effects are applied to a target

H

make it when u got a Book from /reroll or /roll or /start you can Consume it [ also for 2ndShrine ]

and also make it show Subcommands [ For /shringive <player> <Shrine/2ndShrine/END> and make /info <Opens a INVENTORY GUI With The Info’s Of The /Shrinegive>

and for /start = <Show Subcommands> /start <1s/1m/1h> [ How long Pvp will be Off [ also in real life time ] and rolls the Players Shrine’s Will make u Fly up [ Slow falling after u get Rolled ] ]

and make it u can't get Ender Shrine from /reroll

Kodari AI
KodariApr 23 at 12:04 pm 12,858 (v2)

Let me read all the relevant files first.

Now I have full context. Here’s the plan:

  • Add SHRINE_BOOK_KEY PDC key so shrine books from /start and /reroll are consumable (right-click to claim)

  • In /start, don’t auto-assign shrine — let book consumption do it; remove auto-assign from reroll handler too

  • Add right-click handler for shrine book in ShrineListener

  • Pretty subcommand displays for /shrinegive and /start

Now add the shrine book right-click handler in ShrineListener, and remove the auto-assign from the reroll handler:

Here’s a summary of every change made:

  • ShrineSMP — Added SHRINE_BOOK_KEY NamespacedKey declared and initialized in onEnable.

  • ShrineItemUtil.createShrineBook — Now embeds the shrine name in PDC (SHRINE_BOOK_KEY) and adds a “Right-click to claim” lore line, making every shrine book consumable.

  • StartCommand — No-arg case now prints a formatted subcommand list. The roll loop no longer auto-assigns data.setShrine() — players must consume the book themselves. Fly-up + slow falling still applies.

  • ShrineGiveCommand — No-arg case prints a full formatted subcommand list describing Shrine, 2ndShrine, and END.

  • ShrineListener — Added a handler block for SHRINE_BOOK_KEY (before the reroll block) that consumes the book and sets the shrine. The reroll handler now only removes the reroll book and gives a new shrine book — shrine assignment happens when that book is consumed. Ender Shrine is already excluded from ShrineType.random() via rollableValues().

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
40 2,679
src/main/java/com/shrinesmp/ShrineSMP.java
package com.shrinesmp;

import com.shrinesmp.commands.*;
import com.shrinesmp.inventory.gui.GUIListener;
import com.shrinesmp.inventory.gui.GUIManager;
import com.shrinesmp.listeners.ShrineListener;
import com.shrinesmp.shrines.ShrineAbility;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

public class ShrineSMP extends JavaPlugin {

    // Static NamespacedKeys
    public static NamespacedKey SHRINE_MACE_KEY;
    public static NamespacedKey SECOND_ABILITY_KEY;
    public static NamespacedKey REROLL_KEY;
    public static NamespacedKey END_ITEM_KEY;
    public static NamespacedKey ENDER_CONSUMABLE_KEY;
    public static NamespacedKey SHRINE_PROJECTILE_KEY;
    public static NamespacedKey SHRINE_SHOOTER_KEY;
    public static NamespacedKey SHRINE_PROJECTILE_TYPE_KEY;
    public static NamespacedKey SHRINE_BOOK_KEY;

    @Getter private static ShrineSMP instance;

    @Getter private PlayerDataManager playerDataManager;
    @Getter private ShrineManager shrineManager;
    @Getter private GUIManager guiManager;

    @Getter @Setter private boolean pvpDisabled = false;

    // Ender shrine: set of players whose next attack ignores 25% armor
    @Getter private final Set<UUID> enderArmorPiercing = new HashSet<>();

    // Ender passive: players currently glowing due to Ender shrine
    private final Set<UUID> enderGlowedPlayers = new HashSet<>();

    @Override
    public void onEnable() {
        instance = this;

        // Init NamespacedKeys
        SHRINE_MACE_KEY = new NamespacedKey(this, "shrine_mace");
        SECOND_ABILITY_KEY = new NamespacedKey(this, "second_ability");
        REROLL_KEY = new NamespacedKey(this, "reroll");
        END_ITEM_KEY = new NamespacedKey(this, "end_item");
        ENDER_CONSUMABLE_KEY = new NamespacedKey(this, "ender_consumable");
        SHRINE_PROJECTILE_KEY = new NamespacedKey(this, "shrine_projectile_damage");
        SHRINE_SHOOTER_KEY = new NamespacedKey(this, "shrine_shooter");
        SHRINE_PROJECTILE_TYPE_KEY = new NamespacedKey(this, "shrine_projectile_type");
        SHRINE_BOOK_KEY = new NamespacedKey(this, "shrine_book");

        playerDataManager = new PlayerDataManager();
        shrineManager = new ShrineManager(this);
        guiManager = new GUIManager();

        // Register listeners
        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getServer().getPluginManager().registerEvents(new ShrineListener(this), this);

        // Register commands
        getCommand("ab1").setExecutor(new Ab1Command(this));
        getCommand("ab2").setExecutor(new Ab2Command(this));
        getCommand("shrinegive").setExecutor(new ShrineGiveCommand(this));
        getCommand("info").setExecutor(new InfoCommand(this));
        getCommand("trust").setExecutor(new TrustCommand(this));
        getCommand("reroll").setExecutor(new RerollCommand(this));
        getCommand("setshrine").setExecutor(new SetShrineCommand(this));
        getCommand("start").setExecutor(new StartCommand(this));
        getCommand("withdraw").setExecutor(new WithdrawCommand(this));
        getCommand("ei").setExecutor(new EICommand(this));

        // Passive tick task (every 2 seconds)
        new BukkitRunnable() {
            @Override
            public void run() {
                for (Player player : getServer().getOnlinePlayers()) {
                    PlayerData data = playerDataManager.getData(player.getUniqueId());
                    if (data == null || data.getShrine() == null || data.isShrineDisabled()) continue;
                    ShrineAbility ability = shrineManager.getAbility(data.getShrine());
                    if (ability != null) {
                        ability.onPassiveTick(player, data);
                    }
                }

                // Ender shrine passive: apply glow to players near Ender shrine holders
                Set<UUID> shouldGlow = new HashSet<>();
                for (Player player : getServer().getOnlinePlayers()) {
                    PlayerData data = playerDataManager.getData(player.getUniqueId());
                    if (data == null || data.getShrine() != ShrineType.ENDER || data.isShrineDisabled()) continue;
                    for (Player nearby : player.getWorld().getPlayers()) {
                        if (nearby.getLocation().distance(player.getLocation()) <= 25) {
                            shouldGlow.add(nearby.getUniqueId());
                        }
                    }
                }
                // Update glowing state
                for (Player player : getServer().getOnlinePlayers()) {
                    boolean shouldBeGlowing = shouldGlow.contains(player.getUniqueId());
                    boolean wasGlowing = enderGlowedPlayers.contains(player.getUniqueId());
                    if (shouldBeGlowing && !wasGlowing) {
                        player.setGlowing(true);
                        enderGlowedPlayers.add(player.getUniqueId());
                    } else if (!shouldBeGlowing && wasGlowing) {
                        player.setGlowing(false);
                        enderGlowedPlayers.remove(player.getUniqueId());
                    }
                }
            }
        }.runTaskTimer(this, 40L, 40L);

        getLogger().info("ShrineSMP enabled with " + ShrineType.values().length + " shrines.");
    }

    @Override
    public void onDisable() {
        // Clean up Ender glow
        for (UUID uuid : enderGlowedPlayers) {
            Player p = getServer().getPlayer(uuid);
            if (p != null) p.setGlowing(false);
        }
        getLogger().info("ShrineSMP disabled.");
    }
}