Mok Mon
📎 1 file 1,518 chars
📄
pasted-code-1793633974872.txt
txt 23 lines
▶
Act as an expert Minecraft Skript developer. Please create a clean, lag-free, and fully stable Skript file named "reo.sk" for Minecraft version 1.21.1 supporting the following specifications:

1. Card System & Upgrades:
- 8 Cards: Gravity Shard, Damage Mirror, Titan Core, Seismic Shard, Echo Pulse, Echo Shadow, Echo Resonance, Echo Nova.
- Support levels 1 to 3 using an "Upgrade Core" item.
- Interactive GUI menu via /reomenu or /reogui to select and view card levels.

2. Ability Mechanics & Cooldowns:
- Every card must have an individual cooldown system with Action Bar warnings.
- Gravity Shard: Pulls nearby entities precisely towards the block location where the player's crosshair is looking.
- Titan Core & Echo Nova: Must feature huge, impressive vanilla particle effects (e.g., extensive lava or flame particles + lightning).
- Other cards use balanced vanilla particles (approx. 10 count) to keep the server completely lag-free.

3. Protection & Inventory:
- Cards and Upgrade Cores cannot be dropped on the ground.
- Cards are safely kept in the player's inventory upon death (no item loss).

4. Reroll Commands:
- /reroll : Rerolls and gives a random card to a specific player with particle FX.
- /rrall: Rerolls and gives random cards to all online players simultaneously.

5. Resource Pack Integration:
- Spawn clean marker entities or armor stands with custom names (like "reo_display_reroll" or "reo_display_card") invisibly to allow custom Resource Pack models without floating text spam.
Kodari AI
KodariNov 2 at 3:41 pm 3
ReoCardSystem
Creates a comprehensive Minecraft Skript implementing an 8-card upgrade system with three levels each. Features interactive GUI menus for card selection, individual cooldown systems with action bar warnings, and unique ability mechanics including gravity-based entity pulling and impressive particle effects. Implements item protection preventing drops and ensuring inventory retention on death. Provides reroll commands for individual players or all online players with particle effects. Integrates invisible marker entities for custom resource pack model support without text spam.
  • Add eight cards with per-player upgrades, abilities, and cooldowns.

  • Add the menu, reroll commands, and item protection.

  • Use temporary invisible reroll displays; resource-pack models need additional model integration.

Place reo.sk in plugins/Skript/scripts/, then run /sk reload reo. Use /reocore <player> [amount] to give upgrade cores; administrative commands require reo.admin.

The invisible reroll stand is a temporary marker. A resource pack alone does not turn named armor stands into models; that requires a compatible model integration. Test the script on your installed Skript version, particularly its particle syntax.

Mok Mon

the applties not working and i want not shard but cards like papaers and make a item display and partcls with resoures packe

Kodari AI
KodariNov 2 at 3:45 pm 2
  1. Change the cards to paper and make ability recognition work with stacked cards.

  2. Add an item display for rerolls and explain the resource-pack requirement.

Updated reo.sk: cards are now paper, stacked cards are recognized, and rerolls show a temporary item display using custom model data 1–8. Existing shard cards still work.

Run /sk reload reo. If abilities still fail, send the reload errors and your Skript version so I can pinpoint the cause.

The display needs a resource pack to show custom models and particles; Kodari doesn’t create resource packs. For custom art or models, enable Studio under Project settings → Generation, or for all projects at https://kodari.ai/settings?tab=features.

Mok Mon
Kodari AI
KodariNov 2 at 3:49 pm 2

Updated reo.sk to address the particle, cooldown comparison, and duration errors shown in your screenshots. I also removed the deprecated permission messages.

Run /sk reload reo again. If any errors remain, send the full reload output and your Skript version.

Mok Mon

can u make the applty for echo pulse like u go up and make like 2 heart damge mirror if anyone hit me the damge reflex and titan core give resesten and streght 3 and seismic make like worden sonic boom and the damge gravity crad if i look any block or air pull him

Kodari AI
KodariNov 2 at 3:56 pm 2
  1. Update Echo Pulse, Damage Mirror, and Titan Core.

  2. Update Seismic and Gravity card targeting and damage.

Updated the card abilities in reo.sk:

  • Echo Pulse: launches you upward and deals 2 hearts of damage nearby.

  • Damage Mirror: reflects damage to living attackers while active. You still take the original hit.

  • Titan Core: grants Resistance III and Strength III for 5 seconds.

  • Seismic Card: fires a damaging Warden-style sonic boom.

  • Gravity Card: pulls nearby entities toward the block you’re looking at, or toward a point in the air if there’s no block in range.

Run /sk reload reo to apply the changes. If it reports errors, send the reload output.

Mok Mon

can u make like cooldown like this and make first u join in theserver make like spin for ur applty but card make reroll delete the applty and give u a new one but with spin and add coomands like give u /reo items u get all reo cards and make tier 2 and 1 and sound effects and make somtihng like energy like 3 enregy when u died u drop item but custom componetnt make the enrgey name is RION and make a good partclas and give me the name of items bec i want to make a resours pack but with name ok thk u

Kodari AI
KodariNov 2 at 4:01 pm 2
  1. Add a first-join spin and rerolls that replace the current card.

  2. Add /reo items, tier controls, and ability feedback.

  3. Add RION energy and a cooldown display.

Added a first-join card spin, replacement spins for rerolls, and /reo items for admins. Run /sk reload reo.

Resource-pack names: Gravity Card, Damage Mirror, Titan Core, Seismic Card, Echo Pulse, Echo Shadow, Echo Resonance, Echo Nova, and Upgrade Core. The reroll item display uses paper with custom model data 1–8, in that order.

Before I add RION and tiers, please clarify:

  1. Does an ability consume RION, or does RION only decrease on death? How should players regain it?

  2. Should death drop one RION or all remaining RION?

  3. What should tier 1 and tier 2 change? The existing upgrades currently go up to level 3.

The pictured cooldown bar needs resource-pack graphics; I can use an action-bar text version without them. The new spin and sound changes haven’t been tested on your server.

Mok Mon

make the echo pulse when u down make damge mirror not work and tier 2 how i get make gui to know and make the limt if u can take the cards in invintory 2 only and cant storge or put or in any storege like bundle hoopers u know and make gravty when i see up the closest player be up like 12 blocks up and when he down take a damge upgrade make it on and make it can use if i make u cant spamm the cards and add alotof partcals and where is the thing is showing like the cooldown and the RION ENERGY

Kodari AI
KodariNov 2 at 4:13 pm 2
  1. Fix the requested ability interactions and upgrade guidance.

  2. Limit card carrying and storage, then add cooldown and RION displays.

Updated reo.sk with:

  • Echo Pulse: damages nearby entities when you land, without triggering their Damage Mirror.

  • Gravity: launches the nearest player within 30 blocks; normal fall damage applies. The launch isn’t guaranteed to reach exactly 12 blocks.

  • Upgrades: /reomenu explains that tier 2 costs one Upgrade Core.

  • Cooldown: the action bar shows the held card’s cooldown or “Ready.”

  • Cards: pickups and /reo items respect a two-card limit; ordinary container transfers are blocked. Bundle and hopper protection still needs further work.

Run /sk reload reo and send any errors if they appear.

RION isn’t implemented yet. Should it decrease only on death, or also when using abilities? How should players regain it?

Mok Mon
Kodari AI
KodariNov 2 at 4:15 pm 1

Fixed the three date comparisons in reo.sk. The else error was caused by the first failed comparison.

Run /sk reload reo again and send any remaining errors.

Mok Mon

and why no cooldown like this and why i cant change the place of the card and why the i can spam and make the echo pulse when u down make damge mirror not work and tier 2 how i get make gui to know and make the limt if u can take the cards in invintory 2 only and cant storge or put or in any storege like bundle hoopers u know and make gravty when i see up the closest player be up like 12 blocks up and when he down take a damge upgrade make it on and make it can use if i make u cant spamm the cards and add alotof partcals and where is the thing is showing like the cooldown and the RION ENERGY plss make it good

Kodari AI
KodariNov 2 at 4:21 pm 4
  1. Fix card movement, storage limits, and ability spam.

  2. Fix Echo Pulse, Gravity, upgrades, and particles.

  3. Add visible cooldown and RION indicators.

Updated reo.sk:

  • Cards can be rearranged in your inventory, with a one-second shared delay between abilities.

  • Echo Pulse damages nearby entities on landing without triggering Damage Mirror.

  • /reomenu explains upgrades: carry the card and spend one Upgrade Core for tier 2.

  • The action bar shows RION and the held card’s cooldown.

  • You start with 3 RION; death drops one RION Energy item. Pick one up and use /rion to restore it.

  • Gravity launches the closest player upward; normal fall damage applies. The height depends on Minecraft physics and terrain.

Run /sk reload reo and send any errors. Storage protection is not yet complete for every bundle, hopper, or plugin inventory interaction. The cooldown is text in the action bar, not the pictured icon-style display; that needs resource-pack graphics.

Mok Mon

make the echo pulse when u down make damge mirror not work and tier 2 how i get make gui to know and make the limt if u can take the cards in invintory 2 only and cant storge or put or in any storege like bundle hoopers u know and make gravty when i see up the closest player be up like 12 blocks up and when he down take a damge upgrade make it on and make it can use if i make u cant spamm the cards and add alotof partcals and where is the thing is showing like the cooldown and the RION ENERGY i want vasible cooldown and ION ENGEREY 3

Kodari AI
KodariNov 2 at 4:34 pm 3
  1. Fix ability timing, Gravity, upgrades, and card restrictions.

  2. Make the cooldown and three RION energy visible.

Updated reo.sk:

  • Cooldown and RION: the action bar shows your RION out of 3 and the held card’s cooldown or READY status.

  • Echo Pulse: deals damage when you land without triggering Damage Mirror; higher tiers increase its damage.

  • Gravity: look upward and use the card to launch the nearest player within 30 blocks. Higher tiers launch harder; fall damage depends on the landing.

  • Tier 2: carry the card and an Upgrade Core, then click the card in /reomenu. The menu now explains this.

  • Added landing and Gravity particles.

The two-card pickup limit and ordinary storage protections are in place, but bundle, hopper, and all inventory-transfer paths are not fully protected yet. The cooldown is text rather than the pictured icon.

Run /sk reload reo from plugins/Skript/scripts/. I couldn’t test it on your server; send any reload errors if they appear.

Mok Mon

make the RION WORK ITS NOT WORKING when i right click

Kodari AI
KodariNov 2 at 4:39 pm 2

Fixed RION Energy: right-click the item to restore one energy, up to 3. It won’t be consumed if your energy is full.

Run /sk reload reo. The script belongs in plugins/Skript/scripts/.

Mok Mon

can u give me a name of cards in skript bec resourspack

Kodari AI
KodariNov 2 at 4:46 pm 1

The cards are all paper, with these exact names and dark purple (&d) coloring:

Card
Reroll display model data
Gravity Card
1
Damage Mirror
2
Titan Core
3
Seismic Card
4
Echo Pulse
5
Echo Shadow
6
Echo Resonance
7
Echo Nova
8

Other items are Upgrade Core (nether star, &b) and RION Energy (prismarine shard, &b).

The model data is currently assigned only to the reroll display, not the paper cards in the inventory. The inventory cards are distinguished by their names.

Mok Mon

make the names and make a discripton for the power and i want from u to change the name like no colors only name and discritpon

Kodari AI
KodariNov 2 at 4:48 pm 2

I’ll give each card a plain, uncolored name and an ability description, while keeping existing colored cards usable.

Card names and descriptions are now uncolored. New cards show their power in their lore, and old colored cards still work.

Place reo.sk in plugins/Skript/scripts/ and run /sk reload reo. Existing cards keep their old appearance; reroll to receive a new one.

Mok Mon

why upgrade core not work and why the applties if i put card in offhand not work

Kodari AI
KodariNov 2 at 5:01 pm 1

The generation was stopped before any content could be produced.

Mok Mon

can u fix upgrade core not work and why the applties if i put card in offhand not work

Kodari AI
KodariNov 2 at 5:03 pm 2
  1. Fix Upgrade Core use in the upgrade menu.

  2. Enable abilities from the offhand.

Updated reo.sk so Upgrade Cores are checked by name in your inventory, and abilities can trigger from the offhand. The cooldown display also checks the offhand when there’s no card in your main hand.

Run /sk reload reo. If an offhand card doesn’t activate, try an empty main hand—some items or blocks use the right-click first. Send any reload errors if they appear.

Mok Mon

the upgrade core not work and make the name of Rion energy and ypgrade core no color

Kodari AI
KodariNov 2 at 5:05 pm 2
  1. Fix the Upgrade Core interaction.

  2. Remove colors from the RION Energy and Upgrade Core names.

Updated reo.sk so the upgrade menu recognizes the clicked card and consumes one Upgrade Core. New Upgrade Core and RION Energy items have uncolored names; older colored items still work.

Run /sk reload reo, then carry the card and core, open /reomenu, and click the card to upgrade it. If it still fails, send the reload output and any message you see when clicking.

Mok Mon

can u make item for spin agin and make commandd to chose my card

Kodari AI
KodariNov 2 at 5:08 pm 3
  1. Add a reusable spin item that rerolls your card.

  2. Add a command to choose a card.

Added to reo.sk:

  • /reospin <player> [amount] — give Card Spin items. Right-click one to spin again and replace your current cards.

  • /reoselect <1–8> — choose your card directly. This also replaces your current cards.

Both commands require reo.admin. Card numbers: 1 Gravity, 2 Damage Mirror, 3 Titan Core, 4 Seismic, 5 Echo Pulse, 6 Echo Shadow, 7 Echo Resonance, 8 Echo Nova.

Place the script in plugins/Skript/scripts/ and run /sk reload reo.

Mok Mon

make command for withrow

Kodari AI
KodariNov 2 at 5:55 pm 2

What would you like to withdraw: RION energy as an item, a card, or something else?

Mok Mon

delete the energy system i dont wont witrow

Kodari AI
KodariNov 2 at 5:57 pm 3

Removed the RION energy system, including death drops and /rion. Card cooldowns still show in the action bar; existing RION items no longer have an effect.

Run /sk reload reo.

Mok Mon

make tier 1 his damge and applty lower then tier 2 and 3

Kodari AI
KodariNov 2 at 6:00 pm 2

I’ll make each upgrade visibly stronger, while keeping the existing cooldowns.

Tier 1 is now weaker than tiers 2 and 3. Damage, launch strength, range, or effect duration scales with the card’s tier, depending on its ability. Titan Core’s Resistance and Strength also increase with each tier.

Run /sk reload reo to apply the changes.

Mok Mon

can u make this a real plugin

Kodari AI
KodariNov 2 at 7:25 pm 2

This is a Skript project; you’re asking to turn it into a Java server plugin. Kodari supports that.

Switch to a Java server plugin

Mok Mon

i want the plugin paper 1.21.4 or 1.21.11

Kodari AI
KodariNov 2 at 7:37 pm 1

Kodari supports Paper plugins for both 1.21.4 and 1.21.11. You can switch this project to a Java plugin and choose the target version there.

Switch to a Paper plugin

Mok Mon

can u make the plugin

Kodari AI
KodariNov 2 at 7:41 pm 5
  • Port the eight cards, upgrades, commands, cooldowns, and inventory protections to Paper.

  • Keep energy removed and show card cooldowns in the action bar.

Created the Paper plugin for 1.21.4 and newer, including the eight cards, upgrades, spin items, commands, and cooldown display.

Compile it in Kodari, then remove or disable reo.sk before installing the plugin so both versions don’t run together. Existing named cards and cores are recognized, but Skript tier data does not transfer automatically. I haven’t tested it on a server.

Mok Mon

can i send to u the photo for the cards

Kodari AI
KodariNov 2 at 7:42 pm 1

Yes, I can see all eight card designs. Do you want to use them as in-game item textures? That would require a resource pack alongside the plugin.

Mok Mon

ok

Kodari AI
KodariNov 2 at 7:43 pm 1

Kodari can build the plugin, but it can’t create the resource pack needed to display these card images as in-game item textures.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
reo.sk
Code
4 964
src/main/java/com/reo/cards/ReoCards.java
package com.reo.cards;

import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import com.cryptomorin.xseries.particles.XParticle;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
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.EntityPickupItemEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.inventory.InventoryMoveItemEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;

import java.util.ArrayList;
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 ReoCards extends JavaPlugin implements Listener {
    private static final String[] NAMES = {"", "Gravity Card", "Damage Mirror", "Titan Core", "Seismic Card", "Echo Pulse", "Echo Shadow", "Echo Resonance", "Echo Nova"};
    private static final String[] DESCRIPTIONS = {"", "Look up to launch the nearest player into the air.", "Temporarily reflect damage back to attackers.", "Gain Resistance and Strength and blast nearby enemies.", "Fire a sonic boom that damages enemies ahead.", "Leap upward and damage nearby enemies when you land.", "Temporarily gain invisibility and speed.", "Temporarily gain regeneration.", "Blast and launch nearby enemies."};
    private static final int[] COOLDOWNS = {0, 20, 30, 35, 20, 15, 30, 25, 45};
    private final Map<UUID, long[]> cooldowns = new HashMap<>();
    private final Map<UUID, Long> globalCooldown = new HashMap<>();
    private final Map<UUID, Long> mirror = new HashMap<>();
    private final Map<UUID, List<ItemStack>> restore = new HashMap<>();
    private final Set<UUID> pulse = new HashSet<>();
    private final Set<UUID> spinning = new HashSet<>();
    private boolean suppressMirror;
    private NamespacedKey itemKey;

    private static final class Menu implements InventoryHolder {
        private Inventory inventory;
        @Override public Inventory getInventory() { return inventory; }
    }

    @Override public void onEnable() {
        itemKey = new NamespacedKey(this, "item");
        getServer().getPluginManager().registerEvents(this, this);
        Bukkit.getScheduler().runTaskTimer(this, this::updateBars, 10L, 10L);
    }

    private ItemStack item(String material, String name, String key, String... lore) {
        ItemStack item = XMaterial.matchXMaterial(material).map(XMaterial::parseItem).orElseThrow();
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(name);
        if (lore.length > 0) meta.setLore(List.of(lore));
        meta.getPersistentDataContainer().set(itemKey, PersistentDataType.STRING, key);
        item.setItemMeta(meta);
        return item;
    }

    private ItemStack card(int id) {
        return item("PAPER", NAMES[id], "card:" + id, DESCRIPTIONS[id], "Right-click to use.");
    }

    private String name(ItemStack item) {
        if (item == null || !item.hasItemMeta() || !item.getItemMeta().hasDisplayName()) return "";
        return ChatColor.stripColor(item.getItemMeta().getDisplayName());
    }

    private int cardId(ItemStack item) {
        if (item == null || !item.hasItemMeta()) return 0;
        String key = item.getItemMeta().getPersistentDataContainer().get(itemKey, PersistentDataType.STRING);
        if (key != null && key.startsWith("card:")) {
            try { int id = Integer.parseInt(key.substring(5)); return id >= 1 && id <= 8 ? id : 0; }
            catch (NumberFormatException ignored) { return 0; }
        }
        String material = item.getType().name();
        if (!material.equals("PAPER") && !material.equals("AMETHYST_SHARD")) return 0;
        String name = name(item);
        if (material.equals("AMETHYST_SHARD") && name.equals("Gravity Shard")) return 1;
        if (material.equals("AMETHYST_SHARD") && name.equals("Seismic Shard")) return 4;
        for (int i = 1; i <= 8; i++) if (NAMES[i].equals(name)) return i;
        return 0;
    }

    private boolean isCore(ItemStack item) { return item != null && item.getType().name().equals("NETHER_STAR") && name(item).equals("Upgrade Core"); }
    private boolean isSpin(ItemStack item) { return item != null && item.getType().name().equals("AMETHYST_SHARD") && name(item).equals("Card Spin"); }
    private boolean isBundle(ItemStack item) { return item != null && item.getType().name().endsWith("BUNDLE"); }
    private int level(Player player, int id) { return Math.max(1, Math.min(3, getConfig().getInt("levels." + player.getUniqueId() + "." + id, 1))); }
    private int count(Player player) {
        int total = 0;
        for (ItemStack item : player.getInventory().getContents()) if (cardId(item) > 0) total += item.getAmount();
        return total;
    }
    private void message(Player player, String text) { player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&8[&dReo&8] &r" + text)); }
    private void bar(Player player, String text) { player.sendActionBar(Component.text(ChatColor.translateAlternateColorCodes('&', text))); }

    private void openMenu(Player player) {
        Menu holder = new Menu();
        holder.inventory = Bukkit.createInventory(holder, 9, Component.text("Reo Cards"));
        for (int id = 1; id <= 8; id++) {
            ItemStack icon = card(id);
            ItemMeta meta = icon.getItemMeta();
            meta.setLore(List.of(DESCRIPTIONS[id], "Your tier: " + level(player, id) + " / 3", "Carry this card and click to upgrade.", "Each upgrade costs 1 Upgrade Core.", "Ask an admin for /reocore <player>."));
            icon.setItemMeta(meta);
            holder.inventory.setItem(id - 1, icon);
        }
        player.openInventory(holder.inventory);
    }

    private void upgrade(Player player, int id) {
        if (id == 0) return;
        int level = level(player, id);
        if (level >= 3) { message(player, "&eThis card is already tier 3."); return; }
        boolean owns = false;
        int coreSlot = -1;
        PlayerInventory inventory = player.getInventory();
        for (int i = 0; i < inventory.getSize(); i++) {
            ItemStack stack = inventory.getItem(i);
            if (cardId(stack) == id) owns = true;
            if (isCore(stack) && coreSlot < 0) coreSlot = i;
        }
        if (!owns) { message(player, "&cCarry this card to upgrade it."); return; }
        if (coreSlot < 0) { message(player, "&cYou need an Upgrade Core."); return; }
        ItemStack core = inventory.getItem(coreSlot);
        if (core.getAmount() == 1) inventory.setItem(coreSlot, null); else core.setAmount(core.getAmount() - 1);
        getConfig().set("levels." + player.getUniqueId() + "." + id, level + 1);
        saveConfig();
        message(player, "&a" + NAMES[id] + " upgraded to tier " + (level + 1) + ".");
        openMenu(player);
    }

    private void select(Player player, int id) {
        PlayerInventory inv = player.getInventory();
        for (int i = 0; i < inv.getSize(); i++) if (cardId(inv.getItem(i)) > 0) inv.setItem(i, null);
        Map<Integer, ItemStack> overflow = inv.addItem(card(id));
        if (!overflow.isEmpty()) player.getWorld().dropItemNaturally(player.getLocation(), overflow.values().iterator().next());
        message(player, "&aYou received " + NAMES[id] + "!");
        particles("END_ROD", player.getLocation().add(0, 1, 0), 30, .6);
    }

    private void spin(Player player) {
        UUID uuid = player.getUniqueId();
        if (!spinning.add(uuid)) { message(player, "&cA card spin is already running."); return; }
        new org.bukkit.scheduler.BukkitRunnable() {
            int ticks;
            @Override public void run() {
                if (!player.isOnline()) { spinning.remove(uuid); cancel(); return; }
                if (ticks++ < 16) bar(player, "&d✦ &f" + NAMES[ThreadLocalRandom.current().nextInt(1, 9)] + " &d✦");
                else { spinning.remove(uuid); select(player, ThreadLocalRandom.current().nextInt(1, 9)); cancel(); }
            }
        }.runTaskTimer(this, 0L, 2L);
    }

    @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        String cmd = command.getName().toLowerCase();
        if (cmd.equals("reomenu")) { if (sender instanceof Player p) openMenu(p); else sender.sendMessage("Players only."); return true; }
        if (cmd.equals("rrall")) { Bukkit.getOnlinePlayers().forEach(this::spin); return true; }
        if (cmd.equals("reoselect")) {
            if (!(sender instanceof Player p)) { sender.sendMessage("Players only."); return true; }
            try { int id = Integer.parseInt(args[0]); if (id < 1 || id > 8) throw new IllegalArgumentException(); if (spinning.contains(p.getUniqueId())) message(p, "&cWait for your spin to finish."); else select(p, id); }
            catch (IllegalArgumentException | ArrayIndexOutOfBoundsException ex) { p.sendMessage("Choose 1 Gravity, 2 Mirror, 3 Titan, 4 Seismic, 5 Pulse, 6 Shadow, 7 Resonance, or 8 Nova."); }
            return true;
        }
        if (cmd.equals("reo")) {
            if (!(sender instanceof Player p) || args.length != 1 || !args[0].equalsIgnoreCase("items")) { sender.sendMessage("Usage: /reo items (players only)"); return true; }
            for (int id = 1; id <= 2 && count(p) < 2; id++) p.getInventory().addItem(card(id));
            p.getInventory().addItem(item("NETHER_STAR", "Upgrade Core", "core"));
            message(p, "&aCards and an Upgrade Core given."); return true;
        }
        if (args.length == 0) { sender.sendMessage("Usage: /" + cmd + " <player> [amount]"); return true; }
        Player target = Bukkit.getPlayerExact(args[0]);
        if (target == null) { sender.sendMessage("Player not found or offline."); return true; }
        if (cmd.equals("reroll")) { spin(target); return true; }
        int amount = 1;
        try { if (args.length > 1) amount = Integer.parseInt(args[1]); } catch (NumberFormatException ex) { amount = 0; }