Aman Singh

Make a plugin for Minecraft version 26.3 for paper server in this plugin when anybody sneak and right click on any mob or player a sound of patpat and a hand on their head appears and add some permission so that admin can restrict someone to pet a specific player

Kodari AI
KodariOct 23 at 6:16 pm 1
PatPetSystem
This plugin enables players to pet mobs and other players by sneaking and right-clicking. When triggered, a patting hand animation appears above the target's head along with a satisfying "patpat" sound effect. The plugin includes a permission system allowing administrators to restrict specific players from petting certain individuals. Admins can configure permissions to block petting between specific player pairs, ensuring full control over social interactions. The system is lightweight, event-driven, and integrates seamlessly with Paper servers, providing an engaging and customizable petting experience for the community.
  • Set up a Paper 26.3 plugin project.

  • Add sneak-right-click petting for mobs and players, with a visible hand-swing gesture and “pat” sound.

  • Gate player targets with per-target permissions so admins can control who may pet each player.

Created PatPat for Paper 26.3. Sneak and right-click a mob or player to trigger a visible hand-swing pat and a purr sound. The interaction is limited to the main hand and has a short cooldown.

Player targets require patpat.pet.player.<playername>; patpat.pet.player grants access to all players, and patpat.pet.player.* is op-only by default. Admins can grant or withhold the target-specific permission to control who may pet each player.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
5 114
src/main/java/com/kodari/patpat/PatPatPlugin.java
package com.kodari.patpat;

import org.bukkit.plugin.java.JavaPlugin;

public final class PatPatPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new PetListener(), this);
    }
}