STRICT VERSION REQUIREMENT
Build this plugin specifically for:
Minecraft Java Edition 1.21.11
Server software: Paper 1.21.11
Java: Java 21
Build system: Maven
The plugin MUST target the Paper API corresponding to Minecraft 1.21.11.
Do NOT target:
* Minecraft 1.21.10 * Minecraft 1.21.9 * Minecraft 1.21.8 * Minecraft 1.21.7 * Minecraft 1.20.x * Spigot-only APIs from older versions
Do NOT use outdated Minecraft APIs or command/item systems from previous versions.
Use the modern Paper/Bukkit APIs available for 1.21.11.
The Maven pom.xml must use the correct Paper API dependency for 1.21.11.
The final plugin must load on a Paper 1.21.11 server without requiring the server owner to downgrade Minecraft.
Before finishing:
- Verify every API used is compatible with 1.21.11.
- Run
mvn clean package. - Fix all compilation errors.
- Check for deprecated/outdated API usage where possible.
- Build the final JAR.
- The final JAR must be intended specifically for Paper 1.21.11.
The plugin should identify itself as:
BrokenReality
Version: 1.0.0
Minecraft: 1.21.11
Server: Paper
Java: 21
The final plugin.yml should contain the appropriate plugin metadata and commands.
IMPORTANT:
Do not automatically choose the newest Minecraft version available.
Minecraft 1.21.11 is the required and fixed target version.
📄
pasted-code-1791120048860.txt
txt
979 lines
▶
You are an expert Minecraft Java plugin developer.
Your task is to create a COMPLETE, PRODUCTION-READY Minecraft SMP plugin called BrokenReality.
The plugin should be inspired by the progression/gameplay feeling of Bliss SMP, but it must be an ORIGINAL system. Do not copy Bliss SMP's code, assets, names, or exact mechanics.
The central mechanic is a collection of 11 Reality Cards:
8 Normal Cards
3 Special Cards
The plugin must be fully functional when compiled. Do NOT give me pseudocode, incomplete classes, TODOs, placeholder methods, or "implement this yourself" sections.
I want the entire Java project, including every required class, resource, configuration file, plugin.yml, and build configuration.
1. TECH STACK
Use:
Java 21
Paper API
Latest stable Minecraft version supported by the project
Maven
Adventure API / MiniMessage where appropriate
PersistentDataContainer for identifying cards
Bukkit/Paper events
YAML configuration
UUID-based player data
Create a standard Maven project:
BrokenReality/
├── pom.xml
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── brokenreality/
│ │ │ ├── BrokenReality.java
│ │ │ ├── card/
│ │ │ ├── ability/
│ │ │ ├── command/
│ │ │ ├── gui/
│ │ │ ├── listener/
│ │ │ ├── player/
│ │ │ ├── storage/
│ │ │ ├── cooldown/
│ │ │ ├── util/
│ │ │ └── config/
│ │ └── resources/
│ │ ├── plugin.yml
│ │ └── config.yml
└── README.md
The final project must compile using:
mvn clean package
The final JAR must be created in:
target/BrokenReality.jar
2. MAIN CONCEPT
Players discover Reality Cards.
Cards are physical Minecraft items.
Each card has:
Unique ID
Name
Description
Rarity
Ability
Cooldown
Custom Model Data
Display material
Discovery state
Optional activation sound
Optional activation particles
Cards should look like mysterious fragments of a broken reality.
The cards are the main progression system of the SMP.
3. THE 11 CARDS
Implement ALL 11 cards directly in Java.
Do not make them empty placeholders.
NORMAL CARDS
1. RIFT CARD
Ability:
When activated, create a temporary dimensional rift.
The player should be teleported a configurable distance forward, provided the destination is safe.
Requirements:
Right-click to activate
Check for safe destination
Do not teleport inside blocks
Play portal-like particles
Play teleport sound
Configurable cooldown
Configurable maximum distance
Default cooldown:
45 seconds
Default distance:
12 blocks
2. VOID CARD
Ability:
Temporarily protect the player from damage.
When activated:
Give Resistance
Give temporary fall-damage immunity
Create dark particles around the player
Play a deep sound
Display an action-bar message
Default duration:
8 seconds
Default cooldown:
60 seconds
3. TIME CARD
Ability:
Manipulate time around the player.
When activated:
Players within a configurable radius receive Slowness
Hostile mobs receive stronger Slowness
The user is NOT slowed
Spawn clock/time particles
Play a unique sound
Default radius:
10 blocks
Default duration:
6 seconds
Default cooldown:
75 seconds
4. ECHO CARD
Ability:
Create an illusionary copy of the player.
The clone should:
Use the player's skin/name appearance where technically possible
Spawn a fake/temporary entity or suitable Paper-compatible representation
Remain for a configurable duration
Disappear automatically
Create particles when spawned
Confuse nearby players
If a true player clone is not possible without external dependencies, implement the closest reliable Paper-compatible visual illusion.
Default duration:
10 seconds
Default cooldown:
90 seconds
5. GRAVITY CARD
Ability:
Manipulate gravity around the player.
When activated:
Nearby living entities are launched upward
Players are given a short levitation effect or controlled velocity
The user is unaffected
Add cloud/portal particles
Play a powerful sound
Default radius:
8 blocks
Default launch strength:
1.2
Default cooldown:
50 seconds
6. DECAY CARD
Ability:
Cause reality around an enemy to decay.
When activated on a target:
Apply Wither
Apply Weakness
Apply Slowness
Create dark particles
Play a corrupted sound
Show the target a message
Default duration:
7 seconds
Default cooldown:
60 seconds
The player cannot target themselves.
7. SHIFT CARD
Ability:
Instantly shift the player to another safe position.
The teleport location should be randomly selected within a configurable radius.
Requirements:
Never teleport into blocks
Never teleport into lava
Never teleport into the void
Never teleport inside dangerous locations
Search for a safe destination
If no safe location is found, cancel the ability
Default radius:
25 blocks
Default cooldown:
40 seconds
8. CHAOS CARD
This card has an unpredictable effect.
When activated, randomly select one of several effects.
Positive examples:
Speed
Strength
Regeneration
Resistance
Short teleport
Negative examples:
Slowness
Blindness
Weakness
Random knockback
Hunger
Neutral/chaotic examples:
Random nearby lightning effect
Random particle explosion
Swap position with a nearby player
The outcome must be announced to the user.
Make the possible effects configurable.
Default cooldown:
35 seconds
4. SPECIAL CARDS
Special cards must feel substantially more powerful and rare than normal cards.
9. REALITY CARD
This is a legendary card.
Ability:
Temporarily distort reality in a configurable area.
Possible effects:
Change weather
Create a temporary night
Apply visual particles
Temporarily alter gravity
Give nearby players random effects
Create a temporary "reality distortion" zone
The effect should feel like a major SMP event.
When activated:
Broadcast:
⚠ REALITY HAS BEEN DISTORTED ⚠
to all players.
Play a global sound.
Spawn large particle effects.
Default cooldown:
10 minutes
5. BROKEN CARD
This is the second special card.
Its ability should be dangerous and unpredictable.
When activated, randomly select one major event.
Possible events:
Teleport the player to a random safe location.
Temporarily invert controls/movement where technically possible.
Give extremely strong buffs.
Give extremely strong debuffs.
Create a large knockback pulse.
Temporarily affect nearby players.
Create a large particle explosion.
Trigger a temporary world/environmental distortion.
The effect must be clearly communicated.
Play unique sounds and particles.
Default cooldown:
15 minutes
6. ??? CARD
The third special card is intentionally mysterious.
Initially display:
???
Name:
Unknown Card
Description:
This card should not exist.
Its ability must be hidden until the card is revealed.
Implement a reveal system.
Admin command:
/card reveal mystery
After revelation, the card becomes:
THE LAST CARD
Its actual ability should be extremely powerful but still reasonable for an SMP.
Suggested ability:
Reality Rewrite
When activated:
Create a huge reality distortion effect
Temporarily affect nearby players
Apply a combination of powerful effects
Create a massive particle event
Broadcast a unique message
Play a global sound
Put the card on an extremely long cooldown
Default cooldown:
30 minutes
Make the actual ability configurable.
7. CARD ITEM SYSTEM
Every card must be a real Minecraft item.
Use:
PersistentDataContainer
to store:
brokenreality:card_id
Example:
brokenreality:rift
brokenreality:void
brokenreality:time
Never identify cards solely using display names.
Cards must survive:
Server restarts
Inventory movement
Chests
Ender chests
Player deaths
Item drops
Trading
8. CARD ACTIVATION
Cards should activate using:
Right Click
The plugin must detect:
RIGHT_CLICK_AIR
RIGHT_CLICK_BLOCK
Prevent unintended activation when appropriate.
The card should have:
Cooldown
Sound
Particles
Action bar
Optional title
Ability execution
After activation, the card should NOT disappear unless the configuration specifically says it is consumable.
Make this configurable:
cards:
rift:
consume-on-use: false
9. COOLDOWN SYSTEM
Create a proper reusable cooldown manager.
Requirements:
UUID-based
Per-card cooldowns
Persistent if desired
Prevent spam
Show remaining cooldown to the player
Example:
[RIFT] Cooldown: 32s
If a player tries to use a card during cooldown:
✦ This card is still recovering...
Do not allow ability execution.
10. /CARDS GUI
Create:
/cards
Open a custom inventory GUI.
Title:
✦ BROKEN REALITY ✦
Display all 11 cards.
Normal cards:
Visible when discovered
??? when undiscovered
Special cards:
Hidden until discovered/revealed
Each card should show:
Card Name
Rarity
Description
Ability
Cooldown
Discovered: YES/NO
Use different visual styling for rarity.
GUI should be configurable.
11. CARD DISCOVERY
Players should have a personal collection.
When a player obtains a card for the first time:
✦ REALITY CARD DISCOVERED
You discovered: Rift Card
If it is a special card:
Broadcast:
⚠ has discovered a SPECIAL REALITY CARD.
Make broadcasts configurable.
Discovery must be stored permanently.
12. CARD TRADING
Players should be able to trade cards naturally through Minecraft inventories.
Do NOT allow players to duplicate cards through:
Shift-click bugs
Double-click
Hopper interactions
Container exploits
Death duplication
Plugin reloads
The card item itself represents ownership.
13. CARD COMMANDS
Implement:
/cards
/card
/card list
/card give [amount]
/card remove [amount]
/card giveall
/card reveal
/card discover
/card reload
/card info
Add tab completion.
Examples:
/card give Steve rift
/card give Steve reality
/card reveal mystery
/card discover Steve broken
14. PERMISSIONS
Implement:
brokenreality.admin
brokenreality.card.give
brokenreality.card.remove
brokenreality.card.reveal
brokenreality.card.discover
brokenreality.reload
brokenreality.cards
Use proper permission checks.
15. CONFIG.YML
Create a fully functional configuration.
Example structure:
settings:
debug: false
language: en
cards:
rift:
enabled: true
cooldown: 45
consume-on-use: false
custom-model-data: 1001
max-distance: 12
void:
enabled: true
cooldown: 60
duration: 8
custom-model-data: 1002
time:
enabled: true
cooldown: 75
duration: 6
radius: 10
custom-model-data: 1003
Continue this for every card.
Everything that makes sense should be configurable.
16. CUSTOM MODEL DATA
Every card must support custom model data.
Use unique values:
1001 = Rift
1002 = Void
1003 = Time
1004 = Echo
1005 = Gravity
1006 = Decay
1007 = Shift
1008 = Chaos
1009 = Reality
1010 = Broken
1011 = Unknown
Make the values configurable.
The plugin must continue working even if no resource pack is installed.
17. PARTICLES & SOUNDS
Each card needs its own visual identity.
Use Paper/Bukkit particles and sounds.
Examples:
Rift:
PORTAL
REVERSE_PORTAL
Void:
SOUL
SCULK_SOUL
Time:
ENCHANT
END_ROD
Gravity:
CLOUD
PORTAL
Decay:
ASH
SOUL
Chaos:
RANDOMIZED PARTICLES
Special cards should have much larger effects.
All effects should be configurable where practical.
18. PLAYER DATA
Create persistent player data.
Store:
UUID
Discovered cards
First discovery timestamps
Use YAML or JSON storage.
Example:
plugins/BrokenReality/players/.yml
The plugin must automatically save data.
Never lose discovery progress after restart.
19. SAFETY SYSTEMS
Teleport abilities must have robust safety checks.
Never teleport players into:
Solid blocks
Lava
Fire
Void
Unloaded chunks where avoidable
Dangerous locations
Create a reusable:
SafeLocationFinder
class.
20. EVENT SYSTEM
Create custom Bukkit events where useful.
For example:
CardUseEvent
CardDiscoverEvent
CardRevealEvent
These should allow other plugins to hook into BrokenReality.
21. API
Create a public API so another plugin can check:
CardManager
PlayerCardData
Card
CardAbility
Other plugins should be able to ask:
hasDiscovered(UUID player, String cardId)
and:
giveCard(Player player, String cardId)
22. EXPLOIT PREVENTION
Pay special attention to:
Item duplication
GUI duplication
Hopper duplication
Death duplication
Inventory click exploits
Reload issues
Card identification spoofing
Renaming cards in anvils
Copying item NBT/PDC
Creative mode abuse
Only the actual PDC card ID should determine whether an item is a Broken Reality card.
23. MULTI-WORLD SUPPORT
The plugin must work across multiple worlds.
Add optional configuration:
worlds:
enabled: true
allowed:
- world
- world_nether
- world_the_end
Allow admins to disable cards in specific worlds.
24. RELOAD
Implement:
/card reload
It should reload configuration safely.
Do NOT recreate listeners unnecessarily.
Do NOT cause duplicate event listeners.
Do NOT wipe player data.
25. ERROR HANDLING
The plugin must fail gracefully.
If:
A configuration value is invalid
A sound does not exist
A particle is invalid
A card ID doesn't exist
A player doesn't exist
A teleport fails
the plugin should show a useful error instead of crashing.
26. MESSAGES
Put messages in config.yml.
Examples:
messages:
prefix: "[BrokenReality] "
no-permission: "You don't have permission."
card-not-found: "That card does not exist."
cooldown: "This card is on cooldown for
Set up the Maven project for Java 21 and the fixed Paper 1.21.11 API.
Implement the card catalog, abilities, persistent discovery/cooldowns, safety checks, GUI, commands, and events.
Add configuration and README; rely on the project verifier for compilation rather than claiming a local Maven build.
Created the BrokenReality Maven project targeting Paper 1.21.11 / Java 21, with all 11 card abilities, PDC-based card items, UUID discovery storage, cooldowns, safe teleport checks, GUI, commands, permissions, events, configuration, and README.
Build status: Not verified. I did not run mvn clean package, so I can’t confirm that target/BrokenReality.jar exists. In Kodari, click Compile (or on phone: ⋮ → Compile Project), then click Compile in the window. If it succeeds, download the JAR there. The configured output name is target/BrokenReality.jar.
Commands: /cards, /card list, /card give, /card remove, /card giveall, /card reveal, /card discover, /card reload, /card info, /card test, /card debug.
Echo uses a temporary named armor stand with copied equipment; Paper does not provide a supported fake-player skin clone. Custom card textures require a resource pack.
package com.brokenreality;
import com.brokenreality.ability.AbilityService;
import com.brokenreality.card.CardManager;
import com.brokenreality.command.CardCommand;
import com.brokenreality.command.CardsCommand;
import com.brokenreality.cooldown.CooldownManager;
import com.brokenreality.gui.CardGUI;
import com.brokenreality.listener.CardUseListener;
import com.brokenreality.listener.PlayerListener;
import com.brokenreality.player.PlayerDataManager;
import com.brokenreality.util.SafeLocationFinder;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class BrokenReality extends JavaPlugin {
private PlayerDataManager playerDataManager;
private CardManager cardManager;
private CooldownManager cooldownManager;
private SafeLocationFinder safeLocationFinder;
private AbilityService abilityService;
private CardGUI cardGUI;
@Override
public void onEnable() {
saveDefaultConfig();
this.playerDataManager = new PlayerDataManager(this);
this.cooldownManager = new CooldownManager();
this.safeLocationFinder = new SafeLocationFinder();
this.abilityService = new AbilityService(this);
this.cardManager = new CardManager(this);
this.cardGUI = new CardGUI(this);
Bukkit.getPluginManager().registerEvents(new CardUseListener(this), this);
Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
getCommand("cards").setExecutor(new CardsCommand(this));
getCommand("card").setExecutor(new CardCommand(this));
getCommand("card").setTabCompleter(new CardCommand(this));
}
@Override
public void onDisable() {
if (playerDataManager != null) {
playerDataManager.saveAll();
}
}
public void reloadPluginConfig() {
reloadConfig();
}
public PlayerDataManager getPlayerDataManager() { return playerDataManager; }
public CardManager getCardManager() { return cardManager; }
public CooldownManager getCooldownManager() { return cooldownManager; }
public SafeLocationFinder getSafeLocationFinder() { return safeLocationFinder; }
public AbilityService getAbilityService() { return abilityService; }
public CardGUI getCardGUI() { return cardGUI; }
}