Sokna Official

Make plugin pets /Pet sell ចំនួនលុយ for Default player ពេល player /pet វានឹងលោត Menu ដូចក្នុង vdo Command for op /pet giveegg name [Namepet] /pet give name [namepet] /pet reset name all or [name pet] /pet reload Pet use config pets ex: la_peace_pet.yml for create pet ដូចនឹង ecopets name: DevNiceV2-Pets Premium v1.5.0 version: '${project.version}' website: https://t.me/+Pp6FtJGB-Ss3Y2M1 api-version: '1.21+' author: Sokna Official description: Need plugin Contact to @devnicev2 Paper : 1.21.11

Kodari AI
KodariSep 8 at 9:04 am 2
PetManagerPro
A comprehensive pet management plugin for Minecraft Paper servers. Players can spawn and manage pets via /pet command, which opens an interactive menu for pet selection and control. Pets follow and jump with the player. Admins use /pet giveegg and /pet give to distribute pets or eggs with custom names, /pet reset to clear pets, and /pet reload to refresh configurations. Pet definitions are loaded from YAML config files (e.g., la_peace_pet.yml) similar to EcoPets, allowing custom pet types, behaviors, and attributes. The plugin supports multiple pets per player, persistent pet ownership, and configurable pet stats. Designed for Paper 1.21+ with a premium feature set, offering a user-friendly interface and robust admin controls for server customization.
  1. Create the Gradle/Paper project metadata and plugin resources.

  2. Add configurable pet definitions, messages, storage, and menu settings.

  3. Implement pet ownership, spawning/following, eggs, GUI interactions, Vault selling, and admin/player commands.

  4. Register all components through the main plugin class and permissions.

The initial project files are in place; I’m applying the required build/runtime metadata so Lombok-backed models compile and Vault remains optional for /pet sell.Created the Paper 1.21.11 pet plugin project.

Features included:

  • /pet opens the pet GUI menu.

  • Pet definitions load from plugins/DevNiceV2-Pets Premium v1.5.0/pets/*.yml.

  • /pet give <player> <pet>

  • /pet giveegg <player> <pet>

  • /pet reset <player> all|<pet>

  • /pet sell <amount> using Vault economy.

  • /pet reload

  • Pet eggs hatch by right-clicking.

  • Pets follow players, are invulnerable, silent, non-collidable, and removed when players quit.

  • YAML player ownership storage.

  • Default la_peace_pet.yml.

  • Permissions:

    • pets.use — default: true

    • pets.admin — default: op

    • pets.reload — default: op

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
14 928
src/main/java/com/devnicev2/pets/PetsPlugin.java
package com.devnicev2.pets;

import com.devnicev2.pets.command.PetCommand;
import com.devnicev2.pets.economy.EconomyHook;
import com.devnicev2.pets.listener.PetListener;
import com.devnicev2.pets.manager.PetManager;
import com.devnicev2.pets.menu.PetMenu;
import com.devnicev2.pets.util.Text;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Map;

public final class PetsPlugin extends JavaPlugin {
    private PetManager petManager;
    private PetMenu petMenu;
    private EconomyHook economyHook;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        economyHook = new EconomyHook(this);
        petManager = new PetManager(this);
        petManager.load();
        petMenu = new PetMenu(this, petManager);

        PetCommand petCommand = new PetCommand(this, petManager, petMenu, economyHook);
        if (getCommand("pet") != null) {
            getCommand("pet").setExecutor(petCommand);
            getCommand("pet").setTabCompleter(petCommand);
        }
        getServer().getPluginManager().registerEvents(new PetListener(this, petManager, petMenu), this);
        petManager.startFollowTask();
    }

    @Override
    public void onDisable() {
        if (petManager != null) {
            petManager.shutdown();
        }
    }

    public PetManager getPetManager() {
        return petManager;
    }

    public PetMenu getPetMenu() {
        return petMenu;
    }

    public EconomyHook getEconomyHook() {
        return economyHook;
    }

    public String message(String key) {
        return Text.color(getConfig().getString("messages." + key, key));
    }

    public void send(CommandSender sender, String key) {
        sender.sendMessage(message("prefix") + message(key));
    }

    public void send(CommandSender sender, String key, Map<String, String> replacements) {
        String value = message(key);
        for (Map.Entry<String, String> entry : replacements.entrySet()) {
            value = value.replace("%" + entry.getKey() + "%", Text.color(entry.getValue()));
        }
        sender.sendMessage(message("prefix") + value);
    }
}