_badnine

1️⃣ Basic Concept

First of all, in 1.21+, every custom item must use a unique item model identifier, for example:

potatosmp:potato1 → Void Potato

potatosmp:potato2 → Cursed Potato

potatosmp:potato3 → Withering Potato

This is NOT the old CustomModelData system (1, 2, 3), because after 1.21 the rules have changed.

Everything is based on the new item_model system.

2️⃣ Item Structure

Each potato item has:

Name: Based on the potato type (e.g. Void Potato, Cursed Potato, Withering Potato)

Model: Set through the resource pack (example: potatosmp:void_potato)

Item display name

Right-click interaction handled by Skript

3️⃣ Ability Working System

When a player:

Holds the stick in hand

Right-clicks

The Skript checks:

Is the player holding the correct potato item?

If yes → that potato’s ability activates

If a cooldown is active → ability does not activate

4️⃣ Void Potato – Ability Explanation

Function:

Player right-clicks

Nearby players (within a limited radius) are teleported downwards toward the void

Extra Points:

Works only within a limited distance

Has a cooldown to prevent spam

Sound effects are added for better feel

5️⃣ Cursed Potato – Ability Explanation

Function:

On right-click, lightning strikes nearby players

Players also take damage

Extra Points:

Area-based effect

Separate cooldown system

Lightning only strikes when the ability is used

6️⃣ Withering Potato – Ability Explanation

Function:

On right-click, nearby players receive the Wither effect

Extra Points:

Effect has a fixed duration

Limited radius

Balanced for PvP situations

7️⃣ Cooldown System

Each potato has its own separate cooldown:

Cooldown starts immediately after ability use

Ability cannot be used again during cooldown

Player is informed via action bar

Cooldown finishes in the background, not only while holding the item

8️⃣ Eating Disable System

These potatoes cannot be eaten

No message like “You can’t eat this” is shown

Eat action is silently cancelled

Kodari AI
KodariFeb 2 at 3:46 am 10,161 (v2)

I’ll create a custom potato items plugin with special abilities for your SMP.

PotatoSMP
A custom items plugin featuring three special potato types with unique abilities. Void Potato teleports nearby players downward, Cursed Potato strikes lightning on nearby players, and Withering Potato applies wither effects. Each potato has individual cooldowns, area-based targeting, and prevents eating. Designed for 1.21+ with custom item model support and resource pack integration.

Plan:

  • Core plugin with item manager using PersistentDataContainer for item identification

  • Three ability implementations with area-based targeting

  • Per-player, per-potato cooldown system

  • Right-click listener and eat prevention listener

  • Configuration for customization (ranges, cooldowns, effects)

Plugin created successfully!

The PotatoSMP plugin is ready with:

✅ Three Potato Types with unique abilities:

  • Void Potato - Teleports nearby players downward

  • Cursed Potato - Strikes lightning and damages nearby players

  • Withering Potato - Applies wither effect to nearby players

✅ Key Features:

  • Individual cooldown tracking per potato type

  • Area-based targeting with configurable radius

  • Action bar cooldown messages

  • Silent eating prevention

  • Sound effects for each ability

  • Full permission system

  • /potato <type> [player] command with tab completion

✅ 1.21+ Compatible:

  • Uses CustomModelData (values 1, 2, 3 in config)

  • PersistentDataContainer for item identification

  • XSeries for cross-version compatibility

Resource Pack Setup Required: You’ll need to create a resource pack that maps the CustomModelData values to your custom models:

  • CustomModelData: 1 → potatosmp:void_potato model

  • CustomModelData: 2 → potatosmp:cursed_potato model

  • CustomModelData: 3 → potatosmp:withering_potato model

All abilities, cooldowns, ranges, and messages are fully customizable in config.yml.

_badnine

how i can download this plugin?

Kodari AI
KodariFeb 2 at 3:49 am 2,022 (v2)

This is a source code project that needs to be compiled into a plugin JAR file. Here’s how to get the plugin:

Building the Plugin

  1. Prerequisites:

    • Install Java 8 or higher

    • Gradle is included (uses Gradle wrapper)

  2. Build the plugin:

    Shell
    # On Windows:
    gradlew.bat build
    
    # On Linux/Mac:
    ./gradlew build
    
  3. Get the compiled JAR:

    • After building, find the plugin at: build/libs/PotatoSMP-1.0.0.jar

  4. Install on your server:

    • Copy PotatoSMP-1.0.0.jar to your server’s plugins/ folder

    • Restart your server

What This Plugin Does

  • Custom Potato Items: Cursed Potato, Withering Potato, Void Potato

  • Special Abilities: Right-click potatoes to trigger effects (blind, wither, void damage)

  • Cooldown System: Prevents ability spam

  • Commands: /potato <type> - Give special potatoes (requires potatosmp.admin)


Note: If you don’t want to build it yourself and just want a ready-to-use JAR file, you would need someone to compile it for you or use a CI/CD service. The standard way for Minecraft plugins is to build from source as shown above.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
14 632
src/main/java/com/potatosmp/PotatoSMP.java
package com.potatosmp;

import com.potatosmp.ability.CursedPotatoAbility;
import com.potatosmp.ability.VoidPotatoAbility;
import com.potatosmp.ability.WitheringPotatoAbility;
import com.potatosmp.command.PotatoCommand;
import com.potatosmp.cooldown.CooldownManager;
import com.potatosmp.item.PotatoItemManager;
import com.potatosmp.listener.EatPreventionListener;
import com.potatosmp.listener.RightClickListener;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class PotatoSMP extends JavaPlugin {
    private PotatoItemManager itemManager;
    private CooldownManager cooldownManager;
    private VoidPotatoAbility voidPotatoAbility;
    private CursedPotatoAbility cursedPotatoAbility;
    private WitheringPotatoAbility witheringPotatoAbility;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.itemManager = new PotatoItemManager(this);
        this.cooldownManager = new CooldownManager();
        
        this.voidPotatoAbility = new VoidPotatoAbility(this);
        this.cursedPotatoAbility = new CursedPotatoAbility(this);
        this.witheringPotatoAbility = new WitheringPotatoAbility(this);
        
        getServer().getPluginManager().registerEvents(new RightClickListener(this), this);
        getServer().getPluginManager().registerEvents(new EatPreventionListener(this), this);
        
        getCommand("potato").setExecutor(new PotatoCommand(this));
        
        getLogger().info("PotatoSMP has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("PotatoSMP has been disabled!");
    }
}