ayanxd07

Give me credit in the file plugin made by AYANXD07 Create a Minecraft SMP plugin called Diamond SMP featuring 8 unique Diamonds, each with its own special power, custom name, and custom lore.

Every Diamond must have a custom display name and lore that explains its ability, how to activate it, and its cooldown when applicable. The lore must be visible when a player hovers over the Diamond in their inventory.

💎 Diamond Powers

💚 Green Diamond — Earthquake

  • Right-click the Green Diamond to activate the ability.
  • Cooldown: 10 seconds.
  • When activated, a grass-based earthquake effect appears around the player.
  • The earthquake should affect nearby players.
  • Lore should explain the Earthquake ability and its 10-second cooldown.

💙 Blue Diamond — Flood

  • Right-click the Blue Diamond to activate it.
  • Creates a 10×10 flood around the player.
  • The flood remains active during the 10-second cooldown.
  • When the 10-second cooldown finishes, the flood is automatically removed.
  • The ability can then be used again.
  • Lore should explain the Flood ability and its cooldown.

🤍 White Diamond — Ice

  • The player can throw an ice projectile using the White Diamond.
  • Each successful hit deals 1 heart of damage.
  • The ability should be simple and easy to use.
  • Lore should explain the Ice ability.

❤️ Red Diamond — Strength

  • The Red Diamond permanently gives its owner Strength I.
  • No activation is required.
  • The Strength effect remains active while the player owns the Red Diamond.
  • Lore should explain that it permanently grants Strength I.

🧡 Orange Diamond — Fire

  • The Orange Diamond gives its owner a fire-based ability.
  • Create a suitable fire power for the Diamond.
  • Lore should explain the ability and how it is activated.

🖤 Black Diamond — Shadow

  • Right-click the Black Diamond to activate invisibility.
  • The player becomes invisible for 3 minutes.
  • The invisibility ability should have appropriate cooldown protection.
  • The Black Diamond should be unable to coexist with another Diamond power on the same player.
  • Lore should explain the invisibility ability and its duration.

💜 Purple Diamond — Teleport

The Purple Diamond should be rare and difficult to obtain because it is one of the strongest Diamonds.

  • Right-click the Purple Diamond to open a chest-style INVENTORY GUI.
  • The INVENTORY GUI displays the names of all currently online players.
  • Clicking a player's name selects that player as the teleport target.
  • After selecting a target, start a 5-second teleportation countdown.
  • After 5 seconds, teleport the Purple Diamond owner to the selected player.
  • If the player moves during the 5-second countdown, cancel the teleport.
  • Cooldown: 3 minutes.
  • The Purple Diamond should have additional obtaining restrictions so it is harder to get than the other Diamonds.
  • Lore should explain the teleport ability, 5-second delay, and 3-minute cooldown.

💎 Diamond Lore & Appearance

Every Diamond must:

  • Have a unique custom display name.
  • Have unique colored lore.
  • Clearly describe its power.
  • Display the ability's cooldown or duration where applicable.
  • Look visually different from normal Diamonds through its name and lore.
  • The lore should make it obvious which Diamond power the player owns.

Example:

💜 Purple Diamond

"§dPurple Diamond"

"§7Power: Teleportation" "§7Right-click to select a player." "§7Teleport delay: 5 seconds" "§7Cooldown: 3 minutes" "§7Rarity: Very Rare"

🔒 One-Diamond-Per-Player System

Each player may own only ONE Diamond power.

The plugin must prevent players from bypassing this rule through:

  • Normal inventory slots
  • Chests
  • Ender Chests
  • Shulker Boxes
  • Other containers
  • Item movement
  • Item duplication
  • Dropping and picking up Diamonds
  • Any other inventory manipulation

If a player already owns a Diamond and attempts to obtain another Diamond, the second Diamond must not be added to their collection.

If a player attempts to place two Diamond powers into the same chest, the second Diamond must not remain in the chest and should be returned to the player who attempted to place it.

⚙️ Admin Command

Add this command:

"/diamond give <player> <diamond_name>"

Only players with Operator (OP) permissions can use this command.

The command must support all 8 Diamonds:

  • "green"
  • "blue"
  • "white"
  • "red"
  • "orange"
  • "black"
  • "purple"

Add the missing eighth Diamond name for the Orange/remaining power as appropriate.

The command should:

  • Give the selected Diamond to the specified player.
  • Automatically give it the correct custom name and lore.
  • Respect the one-Diamond-per-player rule.
  • Refuse to give another Diamond to a player who already owns one.
  • Display a clear success/error message.

🛡️ Anti-Exploit Requirements

Make sure players cannot duplicate or bypass Diamond powers using:

  • Chests
  • Ender Chests
  • Shulker Boxes
  • Hoppers
  • Droppers
  • Dispensers
  • Item frames
  • Death drops
  • Trading
  • Inventory glitches
  • Any other container or item-transfer method.

The plugin should reliably track which Diamond power belongs to each player.

All abilities should have proper cooldown handling, clear messages, particle/sound effects where appropriate, and protection against exploits.

The final plugin should be optimized for an SMP server and should work smoothly with multiple players online.

Kodari AI
KodariAug 16 at 5:30 pm 3
DiamondSMP
A Minecraft SMP plugin featuring 8 unique Diamonds, each with distinct powers, custom names, and lore. Includes Green (Earthquake), Blue (Flood), White (Ice projectile), Red (permanent Strength I), Orange (Fire), Black (3-minute Invisibility), Purple (Teleport with 5-second delay via GUI), and an eighth Diamond. Enforces a strict one-Diamond-per-player rule across all inventory containers, chests, shulker boxes, and item transfers. Features admin command /diamond give with OP permissions, cooldown management, particle effects, and comprehensive anti-exploit protection against duplication and bypass attempts.

I’ll create the complete Diamond SMP plugin with the eight diamond types, persistent ownership tracking, anti-transfer protections, abilities, selector GUI, command handling, and build metadata.

Created the Diamond SMP plugin by AYANXD07.

  • Added eight owner-bound Diamonds: Green, Blue, White, Red, Orange, Black, Purple, and Cyan.

  • Implemented all abilities with cooldowns, effects, sounds, particles, damage, teleport countdowns, and flood cleanup.

  • Added Purple Diamond player-selection chest GUI with movement cancellation and 3-minute cooldown.

  • Added persistent one-Diamond-per-player ownership tracking.

  • Added anti-duplication protections for inventories, containers, hoppers, dispensers, item frames, death drops, and dropped items.

  • Added /diamond give <player> <diamond_name> for OPs with tab completion and validation.

  • Added Gradle build files and Paper plugin metadata.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
15 1,363
src/main/java/com/ayanxd07/diamondsmp/DiamondSMP.java
package com.ayanxd07.diamondsmp;

import com.ayanxd07.diamondsmp.command.DiamondCommand;
import com.ayanxd07.diamondsmp.gui.GUIListener;
import com.ayanxd07.diamondsmp.gui.GUIManager;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;

public class DiamondSMP extends JavaPlugin {
    public static final String PREFIX = "§8[§bDiamondSMP§8] §7";

    private NamespacedKey diamondKey;
    private NamespacedKey ownerKey;
    private DiamondManager diamondManager;
    private GUIManager guiManager;
    private AbilityService abilityService;

    @Override
    public void onEnable() {
        diamondKey = new NamespacedKey(this, "diamond_type");
        ownerKey = new NamespacedKey(this, "diamond_owner");
        diamondManager = new DiamondManager(this, diamondKey, ownerKey);
        guiManager = new GUIManager();
        abilityService = new AbilityService(this);

        Bukkit.getPluginManager().registerEvents(new DiamondListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        DiamondCommand command = new DiamondCommand(this);
        if (getCommand("diamond") != null) {
            getCommand("diamond").setExecutor(command);
            getCommand("diamond").setTabCompleter(command);
        }
        diamondManager.startTasks();
        getLogger().info("Diamond SMP enabled - made by AYANXD07");
    }

    @Override
    public void onDisable() {
        if (diamondManager != null) {
            diamondManager.save();
        }
    }

    public NamespacedKey getDiamondKey() {
        return diamondKey;
    }

    public NamespacedKey getOwnerKey() {
        return ownerKey;
    }

    public DiamondManager getDiamondManager() {
        return diamondManager;
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }

    public AbilityService getAbilityService() {
        return abilityService;
    }
}