timoffeybitskoff-byte
📎 1 file 7,064 chars
📄
pasted-code-1785086773666.txt
txt 594 lines
▶
# 🚀 SPACE CRATES - PREMIUM MINECRAFT PLUGIN PROMPT

Create a **Paper 1.21+ Minecraft plugin (Java 21)** called **Space Crates**. The plugin should feel like a premium Altar SMP/Lifesteal plugin with polished animations, balanced custom abilities, anti-exploit protection, clean code, and support for a custom resource pack using **CustomModelData**.

---

# 👨‍🚀 STARTER ITEM

On a player's **first join**, they receive a **Custom Player Head**.

**Name**
§b✦ Spaceman ✦

**Texture**
A premium astronaut player head with:

* White helmet
* Large reflective blue visor
* Small antenna
* NASA-inspired design
* Enchanted glow

(Texture configurable with Base64 in config.yml.)

**Lore**
§8Recovered from an abandoned space station.
§7Nobody knows who left it behind...
§b▶ Right Click to Open
§8Contains experimental technology.

Properties:

* Hidden enchant glint
* Cannot be crafted
* Cannot be placed
* Cannot be renamed to bypass checks
* Identified using PersistentDataContainer
* Opens the crate INVENTORY GUI
* Given only once

---

# 🚀 SPACE CRATE INVENTORY GUI

Title:
🚀 SPACE CRATE

54 slots

Theme:

* Black
* Cyan
* Purple
* Animated stars
* Glowing borders
* Floating particles

Middle Button:

§b§lSPIN

Clicking starts a 6-second roulette.

During spin:

* Inventory locked
* Cannot close INVENTORY GUI
* Cannot click items
* One spin at a time

---

# ⭐ RARITIES

Common 45%
Uncommon 30%
Rare 15%
Epic 8%
Legendary 2%

Each rarity has:

* Custom colour
* Sounds
* Particles
* Different border

Legendary additionally:

* Dragon roar
* Firework
* Lightning (visual only)
* Broadcast
* Screen title

---

# ⚔️ WEAPONS

## 1 Nova Blade ⭐⭐⭐

Texture
Black galaxy sword with glowing cyan cracks.

Lore
§8Forged inside a dying star.
§7Reality bends before its edge.
§b▶ Right Click: Nova Dash
§5▶ Shift+Right Click: Star Rift

Description
A balanced mobility sword.

RC Ability
Dash 5 blocks.
10s cooldown.

Shift RC
Dash 10 blocks creating a damaging shockwave.
30s cooldown.

---

## 2 Gravity Hammer ⭐⭐⭐⭐

Texture
Huge black mace with floating purple gravity core.

Lore
§8Even planets obey its pull.

RC
Gravity Pulse
Push enemies away.

8s

Shift RC
Planet Crash
Launch enemies upward before slamming them.

25s

---

## 3 Plasma Scythe ⭐⭐⭐⭐

Texture
Blue plasma energy blade.

Lore
§8Cuts through dimensions.

RC
Shoot plasma slash.

6s

Shift RC
Huge plasma wave.

25s

---

## 4 Galaxy Katana ⭐⭐⭐⭐⭐

Texture
Dark blue katana filled with stars.

Lore
§8Faster than light.

RC
Blink forward.

8s

Shift RC
Teleport behind nearest enemy.
Gain Speed II.

25s

---

## 5 Solar Greatsword ⭐⭐⭐⭐

Texture
Golden sword with burning core.

Lore
§8Powered by the sun.

RC
Ignite enemies.

8s

Shift RC
Solar Explosion.

30s

---

## 6 Black Hole Staff ⭐⭐⭐⭐⭐

Texture
Obsidian staff with floating singularity.

Lore
§8The void watches back.

RC
Gravity Orb.

10s

Shift RC
Creates a miniature black hole pulling nearby players.

40s

---

## 7 Comet Bow ⭐⭐⭐⭐

Texture
White futuristic bow with blue crystal string.

Lore
§8The heavens are your quiver.

RC
Explosive arrow.

8s

Shift RC
Meteor Shower where arrow lands.

35s

---

## 8 Photon Crossbow ⭐⭐⭐

Texture
White laser rifle.

Lore
§8Military prototype.

RC
Laser Bolt.

5s

Shift RC
Laser Barrage.

20s

---

## 9 Void Dagger ⭐⭐⭐

Texture
Black dagger leaking purple smoke.

Lore
§8Silent. Invisible. Deadly.

RC
2 seconds invisibility.

10s

Shift RC
Teleport behind enemy.
Strength I.

30s

---

## 10 Meteor Spear ⭐⭐⭐⭐⭐

Texture
Silver spear with molten crystal.

Lore
§8Thrown by forgotten space kings.

RC
Empowered returning trident.

8s

Shift RC
Summon meteor impact.
No terrain damage.

45s

---

# 🛡️ ARMOUR

## Lunar Helmet

Texture:
White astronaut helmet.
Blue visor.

Lore
§8Designed for moon exploration.

Passive
Night Vision.

---

## Cosmic Chestplate

Texture
White futuristic armour.
Blue reactor.

Passive
5% resistance.

---

## Orbit Leggings

Texture
Energy-lined leggings.

Passive
Speed I while sprinting.

---

## Zero-G Boots

Texture
Rocket boots.

Passive
No fall damage.

---

## Nebula Helmet

Purple galaxy visor.

Passive
Water Breathing.

---

## Solar Chestplate

Golden chestplate.

Passive
Fire Resistance.

---

## Asteroid Leggings

Stone armour.

Passive
10% knockback resistance.

---

## Gravity Boots

Heavy black boots.

Passive
Double Jump every 12s.

---

## Galaxy Suit ⭐⭐⭐⭐

Texture
Complete astronaut suit.

Set Bonus
+2 Hearts
Speed I
Slow Falling

---

## Commander Armour ⭐⭐⭐⭐⭐

Texture
White/black exosuit.
Gold trim.
Blue reactor.
Energy wings.

Set Bonus

+3 Hearts

10% Resistance

Speed I

Temporary Knockback Immunity

---

# 🎨 RESOURCE PACK

Every item uses CustomModelData.

Include:

* Custom models
* 64x64 textures
* Animated emissive glow
* Swing particles
* Ability particles
* Custom icons

Folders

assets/minecraft/models/item/space

assets/minecraft/textures/item/space

---

# ✨ ABILITY SYSTEM

Every weapon has:

Right Click
Smaller ability.

Shift + Right Click
Ultimate ability.

Rules

Cannot spam.

Cooldown shown in action bar.

Particles.

Custom sounds.

Server-side validation.

No block griefing.

---

# 💾 DATA

Save:

* First join
* Crates opened
* Rewards won
* Cooldowns
* Statistics

Use YAML.

---

# ⚙️ CONFIG

Configurable:

Head Texture

Rewards

Cooldowns

Messages

INVENTORY GUI

Sounds

Particles

Broadcasts

Rarities

Drop Chances

Models

---

# 📜 COMMANDS

/spaceman give 

/spaceman reset 

/spaceman reload

/spacecrate open 

/spacecrate spin 

---

# 🔑 PERMISSIONS

spacecrate.admin

spacecrate.give

spacecrate.reload

spacecrate.reset

---

# 🔒 SECURITY

Prevent:

* Duplication
* Fake crate heads
* NBT editing exploits
* Inventory exploits
* Packet abuse
* Multiple simultaneous spins

Use:

* PersistentDataContainer
* NamespacedKeys
* Adventure API
* Inventory listeners
* Proper cooldown manager

---

# 📂 CLASS STRUCTURE

Main

GUIManager

SpinManager

RewardManager

AbilityManager

ItemManager

ModelManager

PlayerDataManager

ConfigManager

CooldownManager

ListenerManager

CommandManager

UtilityManager

---

# GOAL

The finished plugin should feel like a **premium £20–£30 marketplace plugin**, with smooth animations, polished INVENTORY GUI, balanced PvP abilities inspired by Altar SMP, unique custom textures, server-side security, clean object-oriented Java code, and be easy to expand with additional space-themed content in future updates.
Kodari AI
KodariJul 26 at 5:30 pm 16
SpaceCrates
A premium Paper 1.21+ space-themed crate and ability plugin for Java 21. Players receive a protected Spaceman starter head on first join, open a polished 54-slot animated crate GUI, and spin for rarity-based custom-model rewards. It includes ten balanced PvP weapons with cooldown abilities, themed armor passives, YAML persistence, configurable rewards and messages, anti-duplication item identity checks, admin commands, visual effects, legendary broadcasts, and a resource-pack model structure.
  1. Set up the Java 21 Paper plugin, metadata, configuration, and resource-pack model structure.

  2. Implement protected starter items, custom weapons, themed armor, persistent player data, and configurable rarity rewards.

  3. Build the locked animated crate GUI and spin/reward flow with anti-exploit handling.

  4. Add weapon abilities, cooldown feedback, armor passives, commands, permissions, and event registration.

SpaceCrates is a premium Paper 1.21+ space-themed crate and ability plugin. It gives new players a protected Spaceman starter head, provides a six-second animated roulette GUI with configurable weighted rarities and rewards, and grants custom-model weapons and armor with balanced abilities and passive bonuses. YAML-backed player statistics, cooldowns, anti-duplication validation, admin commands, visual effects, broadcasts, and resource-pack model definitions make the system polished and expandable.

Initialized SpaceCrates with:

  • Paper 1.21.1 / Java 21 Gradle setup

  • Protected starter Spaceman head with configurable texture

  • Animated 54-slot crate GUI and weighted rarity rewards

  • Persistent player data and cooldown storage

  • Custom weapons, armor, abilities, passives, and anti-exploit listeners

  • /spaceman and /spacecrate commands with permissions

  • Configurable messages, sounds, particles, rewards, models, and cooldowns

  • Initial resource-pack metadata and custom model definitions

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
27 1,587
src/main/java/com/kodari/spacecrates/SpaceCratesPlugin.java
package com.kodari.spacecrates;

import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SpaceCratesPlugin extends JavaPlugin {
    private ConfigManager configManager;
    private PlayerDataManager playerDataManager;
    private CooldownManager cooldownManager;
    private ItemManager itemManager;
    private RewardManager rewardManager;
    private GUIManager GUIManager;
    private SpinManager spinManager;
    private AbilityManager abilityManager;
    private ArmorManager armorManager;

    @Override
    public void onEnable() {
        configManager = new ConfigManager(this);
        playerDataManager = new PlayerDataManager(this);
        cooldownManager = new CooldownManager(this);
        itemManager = new ItemManager(this);
        rewardManager = new RewardManager(this);
        GUIManager = new GUIManager(this);
        spinManager = new SpinManager(this);
        abilityManager = new AbilityManager(this);
        armorManager = new ArmorManager(this);

        SpaceListener listener = new SpaceListener(this);
        Bukkit.getPluginManager().registerEvents(listener, this);

        SpaceCommand command = new SpaceCommand(this);
        getCommand("spaceman").setExecutor(command);
        getCommand("spaceman").setTabCompleter(command);
        getCommand("spacecrate").setExecutor(command);
        getCommand("spacecrate").setTabCompleter(command);
        getLogger().info("SpaceCrates enabled.");
    }

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