Minecraft Java — Potion SMP Custom Potions Plugin
ROLE
You are an experienced Minecraft Java plugin developer.
Build a production-ready Minecraft Java server plugin called:
PotionSMP
The plugin is specifically designed for a private vanilla+ survival SMP called Potion SMP.
The goal is to add a small, balanced custom-potion system while keeping the server feeling as close to vanilla Minecraft as possible.
Do NOT turn this into an RPG plugin, economy plugin, teleportation plugin, claims plugin, or giant gameplay overhaul.
---
- SERVER ENVIRONMENT
Target:
- Minecraft Java Edition
- Modern Minecraft version compatible with the server API being used
- Paper server
- Bukkit/Paper plugin architecture
- Java
- Maven or Gradle project
- The plugin must compile into a normal ".jar"
- Players should NOT need to install a client-side mod
- Everything must work server-side
If the exact Minecraft version is required, make the project configuration easy to change.
Use the appropriate Paper API for the target version.
Do not use NMS unless absolutely necessary.
Prefer stable Bukkit/Paper APIs.
---
- MAIN CONCEPT
The plugin adds exactly FIVE custom potion types.
Players obtain these potions primarily through crafting.
Each potion must have:
- A unique name
- A unique color
- A custom description/lore
- A custom crafting recipe
- A unique gameplay effect
- A reasonable duration
- A reasonable cooldown where appropriate
- Proper stacking behavior
- Clear identification so the plugin knows it is a custom potion
The potions should feel like rare and valuable items on a survival SMP.
Do NOT make them massively overpowered.
---
- THE FIVE POTIONS
Create exactly these five main custom potions.
---
POTION 1 — 🩸 VITALITY POTION
Display name:
§cVitality Potion
Theme:
Health / survival
Description:
A powerful potion that temporarily improves the player's survivability.
Effect:
When consumed:
- Give the player Absorption IV
- Give the player Regeneration II
- Duration: approximately 20 seconds
- Add a small amount of bonus maximum health temporarily if technically practical and safe for the target Paper version.
If temporary max-health modification is likely to cause compatibility problems, DO NOT use attribute modification. Use Absorption instead.
Balance:
- Strong but not ridiculous.
- No instant full-heal.
- The potion should not permanently modify health.
Particles:
Use subtle red/pink particles.
Sound:
Use a vanilla Minecraft potion/drink sound.
---
POTION 2 — ⚡ HASTE POTION
Display name:
§eHaste Potion
Theme:
Mining / building
Effect:
When consumed:
- Haste II
- Duration: 3 minutes
Optional secondary effect:
- Slight Speed I for 15 seconds after drinking.
Do NOT give extreme mining speed.
This potion should be useful for:
- Mining
- Building
- Clearing areas
- Preparing large SMP builds
Particles:
Yellow/golden.
Sound:
Vanilla potion sound.
---
POTION 3 — 🌑 SHADOW POTION
Display name:
§8Shadow Potion
Theme:
Stealth
Effect:
When consumed:
- Invisibility
- Duration: 45 seconds
- Give Speed I
- Duration: 45 seconds
Important:
The player's armor and held item should still be visible, just like normal Minecraft invisibility.
Do NOT create completely invisible armor unless explicitly configured.
Balance:
This should be useful for:
- Sneaking
- Exploring
- Pranks
- Escaping dangerous situations
But it should NOT make the player permanently invisible.
Particles:
Very subtle dark/purple particles.
---
POTION 4 — 🔥 INFERNO POTION
Display name:
§6Inferno Potion
Theme:
Fire
Effect:
When consumed:
- Fire Resistance
- Duration: 3 minutes
- Strength I
- Duration: 30 seconds
The Strength effect should only last briefly.
Purpose:
Useful for:
- Nether exploration
- Netherite mining
- Fighting mobs
- Short PvP situations
Do NOT give permanent fire immunity.
Do NOT give Strength II or III.
Particles:
Orange/red.
---
POTION 5 — ⚔️ BERSERKER POTION
Display name:
§4Berserker Potion
Theme:
Combat
Effect:
When consumed:
- Strength II
- Duration: 20 seconds
- Resistance I
- Duration: 10 seconds
- Speed I
- Duration: 20 seconds
This should be the strongest combat potion.
However, it must have a meaningful drawback.
After the effects expire:
Give the player:
Weakness I for 15 seconds
This prevents constant use.
Particles:
Red/dark-red.
Sound:
A stronger custom-feeling vanilla sound if possible.
---
- BALANCE RULES
The plugin must be balanced for survival SMP gameplay.
DO NOT:
- Give absurd damage multipliers
- Instantly kill players
- Give creative flight
- Give permanent effects
- Give infinite health
- Break vanilla combat completely
- Automatically teleport players
- Automatically generate items
- Add an economy
- Add quests
- Add levels
- Add RPG stats
- Add custom mobs
The goal is:
Vanilla Minecraft + five special potions.
---
- POTION LIMITATIONS
These limitations are REQUIRED.
LIMITATION 1 — MAXIMUM TWO CUSTOM POTIONS
A player may never hold more than 2 custom PotionSMP potions at the same time.
Important:
- This limit applies ONLY to PotionSMP custom potions.
- Normal vanilla Minecraft potions do NOT count.
- Different custom potion types count individually.
- Two identical custom potions count as two.
- The player may carry unlimited normal vanilla potions, subject to normal Minecraft inventory rules.
- The limit applies across the player's normal inventory, hotbar, off-hand, and armor slots if applicable.
- The plugin must also prevent bypassing this limit through item movement.
Example:
Player inventory:
Vitality Potion ✅ Berserker Potion ✅ Normal Healing Potion ✅ Normal Fire Resistance Potion ✅
Result: VALID
But:
Vitality Potion ✅ Berserker Potion ✅ Shadow Potion ❌
The third custom potion must not be allowed.
If a player attempts to obtain a third custom potion through:
- Crafting
- Picking it up
- Shift-clicking
- Inventory movement
- "/potionsmp give"
- Container interaction
- Any other normal server-side method
the plugin must prevent the third custom potion from entering the player's possession.
For crafting:
Do NOT consume the crafting ingredients if the result cannot be given.
For pickup:
Do not delete the item.
Instead, prevent the pickup and leave the item on the ground.
For admin "/give":
The command should refuse the request and send:
"§cYou cannot carry more than 2 custom Potion SMP potions."
Administrators should not be able to accidentally bypass the restriction through the normal give command.
---
LIMITATION 2 — NO CUSTOM POTIONS IN CONTAINERS
Custom PotionSMP potions may NOT be stored inside player-accessible containers.
Block custom potions from being placed into:
- Chests
- Barrels
- Shulker Boxes
- Ender Chests
- Hoppers
- Droppers
- Dispensers
- Minecart chests
- Minecart hoppers
- Other Bukkit/Paper inventory containers
This prevents players from bypassing the 2-potion carrying limit by storing huge numbers of custom potions in portable or accessible storage.
Normal vanilla potions remain completely unaffected.
If a player attempts to place a custom potion into a container:
- Cancel the movement.
- Keep the potion in the player's inventory.
- Send a small action-bar message:
"§cCustom potions cannot be stored in containers."
Do not destroy the potion.
---
LIMITATION 3 — ONLY ONE CUSTOM POTION EFFECT AT A TIME
A player may have effects from only one active PotionSMP custom potion at a time.
Normal vanilla potion effects are NOT affected by this rule.
Example:
Player drinks:
Berserker Potion
Then while Berserker is active, they drink:
Inferno Potion
The plugin must:
- Remove only the effects previously created by the PotionSMP custom potion.
- Apply Inferno Potion's custom effects.
- Leave unrelated vanilla effects untouched.
Do NOT remove effects caused by:
- Vanilla potions
- Beacons
- Conduit
- Armor
- Food
- Other plugins
The plugin must track its own effects safely.
The player should never be able to stack:
Berserker + Inferno + Vitality + Shadow
into an extremely powerful combination.
Only one PotionSMP custom potion effect set may be active at once.
---
- CRAFTING RECIPES
Every potion must have a unique crafting recipe.
Use a dedicated custom crafting system or Bukkit/Paper recipes.
The recipes should be obtainable through survival gameplay.
Do NOT make recipes require impossible unobtainable items.
Use recognizable Minecraft ingredients.
---
Vitality Potion Recipe
Base:
Awkward Potion
Ingredient:
Golden Apple
Result:
Vitality Potion
---
Haste Potion Recipe
Base:
Awkward Potion
Ingredient:
Diamond
Result:
Haste Potion
---
Shadow Potion Recipe
Base:
Awkward Potion
Ingredient:
Phantom Membrane
Result:
Shadow Potion
---
Inferno Potion Recipe
Base:
Awkward Potion
Ingredient:
Magma Cream
Result:
Inferno Potion
---
Berserker Potion Recipe
Base:
Awkward Potion
Ingredients:
Blaze Powder + Fermented Spider Eye
Result:
Berserker Potion
Make this the most difficult/expensive potion of the five.
---
- IMPORTANT — CUSTOM ITEM IDENTIFICATION
Do NOT identify potions only by their display name.
Use a reliable persistent identifier.
Use:
PersistentDataContainer
with a custom namespace such as:
"potionsmp:potion_type"
Possible values:
"VITALITY"
"HASTE"
"SHADOW"
"INFERNO"
"BERSERKER"
This prevents players from spoofing potions simply by renaming ordinary potions.
Every custom potion must be recognized through its persistent data.
---
- ITEM APPEARANCE
Each custom potion should have:
- Unique display name
- Unique potion color
- Custom lore
- Vanilla potion bottle appearance
- Clear description
Example:
§cVitality Potion
Lore:
"§7A powerful survival potion."
"§7Grants temporary protection and regeneration."
" "
"§8Potion SMP"
Do not add excessive lore.
Keep the UI clean and Minecraft-like.
---
- POTION CONSUMPTION
When a player drinks a custom potion:
- Detect the custom potion using PersistentDataContainer.
- Check the custom-potion effect restriction.
- Check the potion cooldown.
- Cancel normal behavior if necessary.
- Apply the custom effects.
- Play an appropriate vanilla sound.
- Spawn subtle particles.
- Remove exactly one potion from the player's inventory.
- Give the player an empty glass bottle.
- Start the potion cooldown.
- Track the active custom potion effects.
- Send a small action-bar message.
Example:
"§cVitality Potion consumed!"
Do NOT spam chat.
---
- COOLDOWNS
Implement cooldowns to prevent players from rapidly consuming powerful potions.
Suggested cooldown:
- Vitality: 60 seconds
- Haste: 30 seconds
- Shadow: 90 seconds
- Inferno: 60 seconds
- Berserker: 120 seconds
Cooldowns should be configurable in:
"config.yml"
If a player tries to consume a potion during cooldown:
Do not consume the potion.
Show the remaining time.
---
- CONFIGURATION
Create a clean "config.yml".
Allow server administrators to change:
- Potion enabled/disabled
- Duration
- Amplifier
- Cooldown
- Particle settings
- Sound settings
- Recipe enabled/disabled
- Maximum custom potions carried
- Container restriction
- Single-active-effect restriction
Example:
limits: max-custom-potions-carried: 2 prevent-container-storage: true only-one-active-custom-potion: true
---
- ADMIN COMMANDS
Keep commands extremely simple.
Main command:
"/potionsmp"
Aliases:
"/psmp"
Subcommands:
"/potionsmp give <player> <potion> [amount]"
"/potionsmp reload"
"/potionsmp list"
"/potionsmp help"
The "/give" command MUST respect the maximum-two-custom-potions limitation.
Examples:
"/psmp give SpirityPlace vitality 1"
"/psmp give Player123 berserker 2"
If giving the requested amount would exceed the player's limit, refuse the operation safely.
Only administrators with the appropriate permission should be able to use give/reload commands.
Do NOT create unnecessary commands.
---
- PERMISSIONS
Do not require LuckPerms.
Use standard Bukkit permissions.
Permissions:
"potionsmp.admin"
"potionsmp.give"
"potionsmp.reload"
Normal players should not need any permission to craft or use potions.
---
- RECIPE DISCOVERY
If possible, make the recipes discoverable through the normal Minecraft recipe book.
If a custom brewing recipe cannot properly appear in the vanilla recipe book on the target Paper version, document that limitation rather than creating a complicated GUI.
Do NOT create a custom recipe GUI unless necessary.
Keep it vanilla.
---
- DEATH / LOGOUT / RESTART SAFETY
The plugin must handle:
- Player death
- Player logout
- Server restart
- Plugin reload
Cooldown data should not cause errors.
Active custom-effect tracking must be cleaned up safely.
If a player dies, custom potion effects should behave consistently with normal Minecraft potion effects.
Prefer storing cooldowns in memory.
If persistence is necessary, use a simple data file.
Do NOT introduce a database unless absolutely necessary.
---
- MULTIPLE EFFECT INTERACTION
Make sure potion effects behave correctly with normal Minecraft potions.
Do not accidentally remove unrelated vanilla potion effects.
The plugin must track exactly which effects were applied by PotionSMP.
When replacing an active custom potion:
- Remove only the old PotionSMP effects.
- Preserve unrelated vanilla effects.
- Apply the new custom potion effects.
Avoid effect duplication.
---
- INVENTORY SAFETY
The plugin must never:
- Delete unrelated inventory items
- Duplicate potions
- Duplicate bottles
- Consume two potions accidentally
- Lose items if the server crashes during crafting/consumption
- Delete a potion when the player is already at the 2-potion limit
If a player attempts to craft a potion while already carrying 2 custom potions:
Do not consume the crafting ingredients.
If a player attempts to pick up a third custom potion:
Cancel the pickup.
The item must remain safely available on the ground.
---
- ANTI-EXPLOIT REQUIREMENTS
Prevent obvious exploits such as:
- Shift-click recipe duplication
- Double consumption
- Potion duplication through inventory manipulation
- Fake custom potions created through an anvil
- Renaming ordinary potions to imitate custom potions
- Brewing exploits
- Container storage bypasses
- Shulker-box bypasses
- Ender-chest bypasses
- Hopper/dropper bypasses
- Death/respawn duplication
- "/give" bypasses
- Item pickup bypasses
- Hotbar/off-hand bypasses
Again:
PersistentDataContainer is the authoritative identification system.
The 2-potion limit must be checked server-side, not just visually.
---
- VANILLA COMPATIBILITY
Do not modify:
- Vanilla terrain
- Vanilla mobs
- Vanilla ores
- Vanilla weapons
- Vanilla armor
- Vanilla dimensions
- Vanilla world generation
- Vanilla player movement
- Normal vanilla potions
The plugin should be lightweight.
A player who never interacts with a custom potion should have almost exactly the normal vanilla SMP experience.
---
- PERFORMANCE
The plugin must be lightweight.
Do NOT run expensive repeating tasks for every player.
Do NOT scan every inventory every tick.
Do NOT constantly scan loaded chunks.
Cooldowns should use efficient timestamp checks.
The 2-potion inventory limit should be checked through relevant inventory events rather than constantly scanning every player's inventory.
Particle effects should only occur when necessary.
Avoid unnecessary asynchronous tasks.
---
- PROJECT STRUCTURE
Create a clean professional structure similar to:
PotionSMP/ ├── pom.xml ├── src/ │ └── main/ │ ├── java/ │ │ └── <package>/ │ │ ├── PotionSMP.java │ │ ├── command/ │ │ ├── listener/ │ │ ├── potion/ │ │ ├── recipe/ │ │ ├── cooldown/ │ │ ├── restriction/ │ │ └── util/ │ │ │ └── resources/ │ ├── plugin.yml │ └── config.yml └── README.md
Use good object-oriented design.
Avoid putting the entire plugin into one enormous Java class.
---
- PLUGIN.YML
Create a valid "plugin.yml".
Include:
- Plugin name
- Version
- Main class
- API version appropriate for the target
- Commands
- Permissions
Make sure the plugin loads without errors.
---
- ERROR HANDLING
The plugin must fail gracefully.
If a recipe cannot be registered:
Log a useful error.
If a potion type is missing from configuration:
Use a safe default.
If a player name is invalid:
Send an appropriate command error.
Do not crash the entire server because of one invalid configuration value.
---
- LOGGING
On startup:
[PotionSMP] PotionSMP enabled! [PotionSMP] Registered 5 custom potions. [PotionSMP] Registered custom recipes. [PotionSMP] Loaded potion restrictions.
Do not spam the console.
---
- README
Create a complete README explaining:
- How to compile the plugin
- How to install the ".jar"
- Where to put it
- How to configure it
- All five potions
- Crafting recipes
- Potion limitations
- Commands
- Permissions
- Configuration
- Troubleshooting
Clearly explain:
Maximum 2 custom potions per player.
Custom potions cannot be stored in containers.
Only one custom potion effect can be active at a time.
Normal Minecraft potions are unaffected by all three restrictions.
---
- QUALITY REQUIREMENT
This is NOT a prototype.
Write complete, clean, production-quality code.
Do not leave:
- TODO sections
- pseudocode
- fake methods
- missing imports
- missing classes
- placeholder implementations
The final project should compile.
If something is impossible with the chosen Paper API, choose the safest compatible implementation instead.
---
- IMPORTANT DESIGN PHILOSOPHY
Potion SMP should feel like:
"Minecraft SMP, but potions are special."
NOT:
"A giant RPG server disguised as an SMP."
Keep everything:
- Simple
- Vanilla-like
- Balanced
- Lightweight
- Easy to understand
- Fun for YouTubers
- Good for survival
- Good for occasional PvP
The five potions are the central custom mechanic.
Do not add unrelated systems.
---
- FINAL DELIVERABLE
Provide the complete project source code.
It must include:
- All Java source files
- "pom.xml"
- "plugin.yml"
- "config.yml"
- "README.md"
Then compile the project and verify that it produces:
"PotionSMP.jar"
Before considering the task complete, check for:
- Compilation errors
- Invalid imports
- API incompatibilities
- Recipe registration problems
- Potion identification problems
- 2-potion limit bypasses
- Container storage bypasses
- Effect stacking bypasses
- Inventory duplication exploits
- Cooldown bugs
- Null-pointer errors
- Incorrect permissions
- Incorrect plugin.yml
- Server startup errors
The final result should be ready to place into the Paper server's:
"plugins/"
folder.
END OF SPECIFICATION
Create the Paper 1.21.4 Maven project and plugin configuration.
Implement five PDC-identified potions, configurable effects/cooldowns, and discoverable crafting recipes.
Enforce carrying, container, consumption, and active-effect rules through server events and admin commands.
Add setup, configuration, recipe, and troubleshooting documentation.
Created the PotionSMP Maven project with five PDC-identified potions, configurable effects and cooldowns, crafting recipes, admin commands, and event-based carrying/container restrictions. Custom potion shift-click crafting is disabled to prevent multiple outputs bypassing the carrying limit; normal crafting remains available.
The project is configured to produce PotionSMP.jar, but I can’t confirm a successful build without a compile result. In Kodari, click Compile (on phone: ⋮ → Compile Project), then click Compile in the window. If it succeeds, download the jar from that build.
package com.potionsmp;
import com.potionsmp.command.PotionCommand;
import com.potionsmp.listener.PotionListener;
import com.potionsmp.listener.RestrictionListener;
import com.potionsmp.potion.PotionEffectTracker;
import com.potionsmp.potion.PotionItems;
import com.potionsmp.potion.PotionService;
import com.potionsmp.recipe.RecipeManager;
import com.potionsmp.restriction.RestrictionManager;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.Objects;
public final class PotionSMP extends JavaPlugin {
private NamespacedKey potionTypeKey;
private PotionItems potionItems;
private PotionEffectTracker effectTracker;
private RecipeManager recipeManager;
@Override
public void onEnable() {
saveDefaultConfig();
potionTypeKey = new NamespacedKey(this, "potion_type");
potionItems = new PotionItems(this);
effectTracker = new PotionEffectTracker(this);
PotionService potionService = new PotionService(this, effectTracker);
recipeManager = new RecipeManager(this, potionItems);
RestrictionManager restrictions = new RestrictionManager(this, potionItems);
int registeredRecipes = recipeManager.registerRecipes();
Bukkit.getPluginManager().registerEvents(new PotionListener(this, potionItems, potionService,
effectTracker, recipeManager), this);
Bukkit.getPluginManager().registerEvents(new RestrictionListener(potionItems, restrictions), this);
PotionCommand command = new PotionCommand(this, potionItems, restrictions, recipeManager);
Objects.requireNonNull(getCommand("potionsmp")).setExecutor(command);
Objects.requireNonNull(getCommand("potionsmp")).setTabCompleter(command);
getLogger().info("PotionSMP enabled!");
getLogger().info("Registered 5 custom potions.");
getLogger().info("Registered " + registeredRecipes + " custom recipes.");
getLogger().info("Loaded potion restrictions.");
}
@Override
public void onDisable() {
if (effectTracker != null) {
effectTracker.shutdown();
}
if (recipeManager != null) {
recipeManager.removeRecipes();
}
}
public NamespacedKey potionTypeKey() {
return potionTypeKey;
}
}