onlyvirex

Hi

Kodari AI
KodariSep 8 at 12:19 pm 1
MiningRewards
A Minecraft plugin that rewards players with configurable loot when they mine specific blocks. Features a YAML-based reward table where server admins define block types, drop chances, and reward items with quantities. Includes permission-based reward eligibility, cooldown system to prevent farming abuse, and a /miningrewards reload command for live configuration updates. Supports multiple reward entries per block with weighted random selection, and broadcasts rare drops to the server. Integrates with Vault for optional economy rewards alongside item drops. Provides comprehensive logging and a simple, intuitive setup process for server owners.

Hi! What Minecraft plugin would you like to build?

onlyvirex

Create a full practicecore

Kodari AI
KodariSep 8 at 12:23 pm 1
  1. Core lifecycle and persistence: plugin bootstrap, arenas, kits, and player statistics.

  2. Match systems: duel requests, queue matchmaking, inventory restoration, and quit/death handling.

  3. Commands and configuration: admin setup commands, player commands, permissions, and editable messages.

Created a complete PracticeCore Minecraft practice PvP plugin from scratch.

Included:

  • Arena creation, deletion, setup positions, persistence

  • Configurable inventory kits with YAML persistence

  • Duel requests with accept/deny and expiration

  • Queue matchmaking by kit

  • Match inventory/location restoration

  • Death and quit handling

  • Win, loss, and Elo statistics

  • /practice and /duel commands

  • Admin permissions and tab completion

  • Editable messages and plugin configuration

  • Spigot 1.8.8-compatible Gradle setup with Lombok

onlyvirex

No for 1.9+ with mace pvp crystal pvp sword axe diamond dmp netherite smp spear mace

Kodari AI
KodariSep 8 at 12:28 pm 3
  1. Update the plugin target and compatibility for modern Minecraft (1.9+).

  2. Add practice modes/kits for mace, crystal PvP, sword, axe, diamond, DMP, netherite SMP, spear, and mace.

  3. Wire the modes into kit loading, commands, queues, and match validation.

  • Target Paper 1.21.4/Java 21 so mace, crystals, netherite, and modern combat items compile correctly.

  • Replace runtime-only serialized kits with bundled, editable kits.yml definitions and aliases for Crystal PvP/SMP/spear names.

  • Retain kit metadata in active matches and enforce match-only combat/build rules, including Crystal PvP block interaction.

  1. Modernized the plugin for Paper 1.21.4 and Java 21, enabling modern combat items such as mace, netherite gear, crystals, and tridents.

  2. Added bundled editable kits for:

    • Mace

    • Crystal PvP

    • Sword

    • Axe

    • Diamond

    • DMP

    • Netherite SMP

    • Spear

  3. Added aliases:

    • crystal → crystalpvp

    • smp → netheritesmp

    • netherite_smp → netheritesmp

    • spear uses a trident fallback

  4. Added modern kit YAML parsing with material names, slots, and amounts.

  5. Active matches now retain their selected kit.

  6. Added match rules:

    • Crystal PvP allows block placement and breaking.

    • Other modes prevent block placement and breaking.

    • Damage between players from different matches is cancelled.

  7. Updated the help message with all supported modes.

Use commands such as:

Plain Text
/practice queue mace
/practice queue crystalpvp
/practice queue sword
/practice queue axe
/practice queue diamond
/practice queue dmp
/practice queue netheritesmp
/practice queue spear

The packaged defaults are copied to:

Plain Text
plugins/PracticeCore/kits.yml
onlyvirex

Give me .jar plugin

Kodari AI
KodariSep 8 at 12:29 pm 1

I can’t attach a compiled .jar directly from this chat, and the project environment does not have Gradle installed to build it here.

Build it locally from the project root:

Shell
./gradlew clean build

On Windows:

Shell
gradlew.bat clean build

The plugin JAR will be created in:

Plain Text
build/libs/

Copy the resulting PracticeCore-*.jar into your server’s plugins folder, then restart the Paper 1.21.4 server.

onlyvirex

gradlew.bat clean build

Kodari AI
KodariSep 8 at 12:29 pm 1

Run this in the project root on Windows:

Shell
gradlew.bat clean build

If Windows says the file is not recognized, use:

Shell
.\gradlew.bat clean build

The compiled plugin will be at:

Plain Text
build\libs\

Copy the .jar from that folder into your Paper server’s plugins folder.

onlyvirex

Where is .jar plugin

Kodari AI
KodariSep 8 at 12:30 pm 1

The .jar is generated here after a successful build:

Plain Text
build/libs/

Typically:

Plain Text
build/libs/PracticeCore-1.0.0.jar

From the project folder, run:

Shell
.\gradlew.bat clean build

Then copy the JAR from build\libs\ into your Paper server’s plugins folder.

It has not been attached or prebuilt in this chat, so you must run the build command first.

onlyvirex

Its full practice?

Kodari AI
KodariSep 8 at 2:03 pm 1

It is a PracticeCore foundation, not a fully feature-complete practice network plugin.

Currently included:

  • Arenas and arena setup

  • Kits for mace, crystal PvP, sword, axe, diamond, DMP, Netherite SMP, and spear

  • Duel requests and accepting/denying

  • Kit-based queues

  • Match start/end handling

  • Death and quit handling

  • Inventory/location restoration

  • Wins, losses, and Elo statistics

  • Modern Paper 1.21.4 compatibility

  • Crystal PvP block rules

  • Configurable kits and messages

It does not yet include advanced features such as parties, ranked/unranked ladders, rematches, spectators, tournaments, leaderboards, GUI menus, matchmaking rating queues, replays, or database storage.

So the honest answer is: it is a functional core plugin, but not a complete Hypixel-style Practice plugin.

onlyvirex

Can you create a PracticeFull!

Kodari AI
KodariSep 8 at 2:07 pm 2
  1. Audit the current PracticeCore implementation and build setup.

  2. Expand it into a stable PracticeFull core with modern kits, arenas, matches, queues, duels, spectators, rematches, parties, and persistence.

  3. Add commands, permissions, configuration, and listener coverage without breaking the existing API.

  4. Patch the project and leave it ready to compile into a .jar.

  • Replace the two-player match flow with a safer lifecycle that supports full state restoration, spectators, rematches, and match protection.

  • Fix queue rollback and add party management commands.

  • Expand command routing, tab completion, permissions, and configurable messages.

  • Register the new manager and periodic stats persistence, then rename the plugin metadata to PracticeFull.

[Generation stopped]

onlyvirex

Pls persian

Kodari AI
KodariSep 8 at 2:08 pm 1

بله، می‌توانم پلاگین را به زبان فارسی برایت توضیح بدهم و پروژه‌ی PracticeFull را کامل کنم.

نسخه‌ی کامل می‌تواند شامل این امکانات باشد:

  • کیت‌های Mace، Crystal PvP، Sword، Axe، Diamond، DMP، Netherite SMP و Spear

  • دوئل و درخواست دوئل

  • صف‌های Ranked و Unranked

  • سیستم Arena

  • Spectator

  • Rematch

  • Party و Party Duel

  • آمار بازیکن، برد، باخت و Elo

  • بازگردانی کامل Inventory، مکان و وضعیت بازیکن

  • مدیریت مرگ، خروج و زمان‌سنج مسابقه

  • منوهای گرافیکی

  • Leaderboard

  • ذخیره‌سازی اطلاعات

  • پشتیبانی Paper 1.21.4 و Java 21

  • پیام‌ها و تنظیمات قابل ویرایش

تولید قبلی متوقف شد و هنوز نسخه‌ی کامل PracticeFull ساخته نشده است. می‌توانم از همین پروژه ادامه بدهم و کد کامل را آماده‌ی ساخت فایل .jar کنم.

onlyvirex

Pls remove unranked and ranked queue

Kodari AI
KodariSep 8 at 2:09 pm 1
  1. حذف حالت‌های صف Ranked و Unranked از منطق صف، دستورات، تب‌کامپلیتر و تنظیمات.

  2. نگه‌داشتن صف ساده بر اساس نام کیت، مثل /practice queue mace.

[Generation stopped]

onlyvirex

نه با یه ایتم بره تو queue

Kodari AI
KodariSep 8 at 2:12 pm 1
  1. حذف صف‌های Ranked و Unranked و تبدیل صف به یک صف ساده برای هر کیت.

  2. اضافه‌کردن یک آیتم Queue در اینونتوری بازیکن برای ورود/خروج از صف.

  3. اتصال کلیک آیتم به QueueManager و نمایش وضعیت صف.

  4. نگه‌داشتن دستورات فعلی بدون نیاز به Ranked/Unranked.

  • یک آیتم اختصاصی برای صف اضافه می‌کنم که هنگام ورود بازیکن داده می‌شود.

  • با کلیک راست روی آیتم، بازیکن با کیت تنظیم‌شده وارد صف یا از آن خارج می‌شود.

  • دستور /practice queueitem [kit] هم برای گرفتن آیتم صف اضافه می‌شود.

  • متن راهنما و پیام‌های صف از حالت Ranked/Unranked پاک می‌شوند.

صف با آیتم اضافه شد.

امکانات:

  • آیتم صف هنگام ورود بازیکن داده می‌شود.

  • کلیک راست روی آیتم:

    • اگر در صف نباشد، وارد صف کیت می‌شود.

    • اگر در صف باشد، از صف خارج می‌شود.

  • کیت پیش‌فرض در config.yml قابل تنظیم است:

YAML
queue-item:
  material: NETHER_STAR
  name: '&aQueue &7(&f{kit}&7)'
  kit: sword
  • دریافت آیتم با دستور:

Plain Text
/practice queueitem
/practice queueitem sword
  • خروج از صف:

Plain Text
/practice leave
  • حالت‌های Ranked و Unranked دیگر در پیام راهنما استفاده نمی‌شوند.

onlyvirex

تموم شد؟

Kodari AI
KodariSep 8 at 2:15 pm 1

بله، بخش صف با آیتم انجام شد:

  • آیتم Queue هنگام ورود بازیکن داده می‌شود.

  • کلیک روی آن بازیکن را وارد صف می‌کند یا از صف خارج می‌کند.

  • صف‌های Ranked و Unranked حذف شدند.

  • کیت پیش‌فرض از config.yml قابل تنظیم است.

  • دستورهای زیر اضافه/حفظ شدند:

Plain Text
/practice queueitem
/practice queueitem sword
/practice leave

اما کل نسخه‌ی بزرگ PracticeFull هنوز کامل نشده است؛ امکاناتی مثل Party، Spectator، Rematch، GUI و Leaderboard باقی مانده‌اند.

برای ساخت فایل .jar اجرا کن:

Shell
.\gradlew.bat clean build

فایل خروجی در این مسیر قرار می‌گیرد:

Plain Text
build\libs\
onlyvirex

خب اد بده همه چی رو بعد بهم بگو وراستی میشه با maven اوکی کنی؟

Kodari AI
KodariSep 8 at 2:27 pm 4

برنامه:

  1. بررسی دقیق وضعیت فعلی و قابلیت‌های موجود.

  2. تکمیل قابلیت‌های PracticeFull که هنوز وجود ندارند.

  3. تبدیل سیستم build از Gradle به Maven و آماده‌سازی خروجی .jar.

  4. بررسی نهایی ارجاع‌ها و دستور ساخت.

  • هسته‌ی PracticeFull را با spectator، rematch، party، leaderboard و منوی انتخاب کیت تکمیل می‌کنم.

  • منطق match و queue را طوری اصلاح می‌کنم که بازیکن‌ها در خطا یا خروج، گیر نکنند.

  • build را از Gradle به Maven منتقل می‌کنم و pom.xml، metadata و dependencyهای لازم را اضافه می‌کنم.

  • commandها، tab completion، listenerها و پیام‌های فارسی/قابل‌تنظیم را هماهنگ می‌کنم.

  • صف و آمار پایه آماده شد؛ حالا lifecycle مسابقه، spectator و rematch را اضافه می‌کنم.

  • سپس commandهای party، spectate، rematch، leaderboard و GUI کیت را به routing فعلی وصل می‌کنم.

  • Match lifecycle اکنون restore امن‌تر، spectator و rematch دارد.

  • در این مرحله commandهای عمومی و GUI انتخاب کیت را اضافه می‌کنم و پیام‌ها/metadata را هماهنگ می‌کنم.

  • routing کامل شد؛ اکنون کلیک منوی کیت، جلوگیری از جابه‌جایی/دراپ آیتم صف، خروج spectator و پاک‌سازی party هنگام quit را وصل می‌کنم.

  • در پایان، plugin.yml و پیام‌های جدید را برای Maven/PracticeFull به‌روزرسانی می‌کنم.

  • یک ناسازگاری مهم پیدا شد: commandهای جدید در plugin.yml تعریف شده بودند اما در onEnable executor نداشتند؛ همچنین build قدیمی Gradle هنوز کنار Maven باقی مانده بود.

  • این دو مورد و چند وابستگی مستقیم به enumهای Bukkit در GUI را اصلاح می‌کنم تا نسخه واقعاً Maven-based و قابل استفاده باشد.

انجام شد و پروژه به PracticeFull ارتقا پیدا کرد.

قابلیت‌های اضافه‌شده:

  • حذف کامل Ranked و Unranked

  • صف ساده بر اساس Kit

  • آیتم Queue با کلیک برای ورود/خروج از صف

  • منوی انتخاب Kit با /practice menu

  • Duel و Arena

  • Spectator با /spectate

  • Rematch با /rematch

  • Party:

    Plain Text
    /party create
    /party invite <player>
    /party accept
    /party leave
    /party disband
    /party list
    
  • Leaderboard:

    Plain Text
    /leaderboard
    /leaderboard wins
    
  • ذخیره‌ی دوره‌ای Stats

  • ذخیره‌ی Inventory، Armor، Location، Gamemode و Fly هنگام Match

  • جلوگیری از Drop آیتم Queue

  • مدیریت Quit، Death و Spectator

  • Tab Completion

  • تغییر نام Plugin به PracticeFull

  • انتقال کامل Build از Gradle به Maven

برای ساخت فایل .jar در ریشه‌ی پروژه اجرا کن:

Shell
mvn clean package

فایل خروجی اینجا ساخته می‌شود:

Plain Text
target/PracticeFull-1.0.0.jar

بعد آن را داخل این مسیر سرور قرار بده:

Plain Text
plugins/

توجه: این نسخه PracticeFull core است؛ قابلیت‌های بسیار پیشرفته مثل Team Party Match، Replay، Database MySQL و Reset کردن Terrain هنوز در آن پیاده‌سازی نشده‌اند.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
16 1,561
src/main/java/com/kodari/practicecore/PracticeCorePlugin.java
package com.kodari.practicecore;

import com.kodari.practicecore.arena.ArenaManager;
import com.kodari.practicecore.command.PracticeCommand;
import com.kodari.practicecore.kit.KitManager;
import com.kodari.practicecore.match.DuelManager;
import com.kodari.practicecore.match.QueueManager;
import com.kodari.practicecore.stats.StatsManager;
import com.kodari.practicecore.listener.PracticeListener;
import com.kodari.practicecore.party.PartyManager;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.NamespacedKey;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import com.cryptomorin.xseries.XMaterial;
import com.kodari.practicecore.kit.Kit;

public class PracticeCorePlugin extends JavaPlugin {
    private ArenaManager arenaManager;
    private KitManager kitManager;
    private StatsManager statsManager;
    private DuelManager duelManager;
    private QueueManager queueManager;
    private PartyManager partyManager;
    private BukkitTask statsTask;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        arenaManager = new ArenaManager(this);
        kitManager = new KitManager(this);
        statsManager = new StatsManager(this);
        duelManager = new DuelManager(this, arenaManager, kitManager, statsManager);
        queueManager = new QueueManager(this, duelManager, kitManager);
        partyManager = new PartyManager(this);

        PracticeCommand command = new PracticeCommand(this);
        getCommand("practice").setExecutor(command);
        getCommand("practice").setTabCompleter(command);
        getCommand("duel").setExecutor(command);
        getCommand("duel").setTabCompleter(command);
        getCommand("party").setExecutor(command);
        getCommand("party").setTabCompleter(command);
        getCommand("spectate").setExecutor(command);
        getCommand("spectate").setTabCompleter(command);
        getCommand("rematch").setExecutor(command);
        getCommand("rematch").setTabCompleter(command);
        getCommand("leaderboard").setExecutor(command);
        getCommand("leaderboard").setTabCompleter(command);
        getServer().getPluginManager().registerEvents(new PracticeListener(this), this);
        statsTask = getServer().getScheduler().runTaskTimer(this, statsManager::save, 1200L, 1200L);
        getLogger().info("PracticeFull enabled with " + kitManager.getKits().size() + " kits and " + arenaManager.getArenas().size() + " arenas.");
    }

    @Override
    public void onDisable() {
        if (statsTask != null) statsTask.cancel();
        if (queueManager != null) {
            queueManager.clearAll();
        }
        if (duelManager != null) {
            duelManager.shutdown();
        }
        if (arenaManager != null) {
            arenaManager.save();
        }
        if (kitManager != null) {
            kitManager.save();
        }
        if (statsManager != null) {
            statsManager.save();
        }
    }

    public ArenaManager getArenaManager() { return arenaManager; }
    public KitManager getKitManager() { return kitManager; }
    public StatsManager getStatsManager() { return statsManager; }
    public DuelManager getDuelManager() { return duelManager; }
    public QueueManager getQueueManager() { return queueManager; }
    public PartyManager getPartyManager() { return partyManager; }

    public ItemStack createQueueItem(Kit kit) {
        String materialName = getConfig().getString("queue-item.material", "NETHER_STAR");
        ItemStack item = XMaterial.matchXMaterial(materialName).map(XMaterial::parseItem).orElse(null);
        if (item == null) return null;
        ItemMeta meta = item.getItemMeta();
        if (meta == null) return item;
        String name = getConfig().getString("queue-item.name", "&aQueue &7(&f{kit}&7)")
                .replace("{kit}", kit.getName());
        meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', name));
        meta.getPersistentDataContainer().set(new NamespacedKey(this, "queue-kit"), PersistentDataType.STRING, kit.getName());
        item.setItemMeta(meta);
        return item;
    }

    public void giveQueueItem(Player player, Kit kit) {
        ItemStack item = createQueueItem(kit);
        if (item != null) player.getInventory().addItem(item);
    }

    public void send(CommandSender sender, String key, String... replacements) {
        FileConfiguration config = getConfig();
        String message = config.getString("messages." + key, key);
        for (int i = 0; i + 1 < replacements.length; i += 2) {
            message = message.replace("{" + replacements[i] + "}", replacements[i + 1]);
        }
        String prefix = config.getString("messages.prefix", "");
        if (!"help".equals(key)) {
            message = prefix + message;
        }
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&', message));
    }
}