Skip to main content
← Blog

August 25, 2026 · The Minely team

How to make a pets plugin with AI (companions, renames, abilities)

Pets are the most-loved cosmetic system in Minecraft for a reason: a little companion that follows you around makes the world feel alive. Under the cuteness there is real engineering — follow logic that does not rubber-band, a cap so the server is not a zoo, and per-type abilities so pets are more than decoration.

What a pets plugin actually is

A pets plugin lets players summon a companion entity that follows them, carries a custom name, and can be renamed, dismissed, or swapped. Pet types (wolf, cat, fox, axolotl) can carry small passive perks — a reason to collect them rather than pick one forever.

How it works under the hood

The follow engine is a repeating task per active pet: if the owner is beyond N blocks, pathfind or teleport to them; if close, idle or wander slightly. Teleporting at a longer distance prevents the rubber-band sprint that looks broken. Pets live in a per-player record with type, name, and state, and despawn on owner logout (or persist with a respawn-on-join rule). Interactions are cancelled so pets cannot be damaged or leashed by strangers.

The prompt that builds it

You do not have to write this yourself. A precise description is enough:

a pets plugin with /pet summon, a custom named companion that follows you, /pet rename, a cap of one active pet per player, and per-type passive perks

Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.

Building it in the right order

  1. Implement /pet summon with the first pet type and the follow task.
  2. Add rename and dismiss commands with a pet menu GUI.
  3. Enforce the one-pet cap and clean despawn rules.
  4. Add per-type perks (small and non-combat, or the game tips).
  5. Polish the movement: teleport on long distance, idle when close.

The details that matter in production

In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.

Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.

Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.

Tuning it after the first build

Perks should be charming, not meta: a fox that occasionally picks up a dropped item, a cat that scares off creepers, a wolf that growls at hostile mobs within a few blocks. One active pet per player keeps performance trivial; pet types as unlockables or shop items give the economy another sink.

Tips that save you a rebuild

  • Teleport instead of long pathfinding — it looks better and costs nothing.
  • Make pets invulnerable and non-colliding, or the first cave will eat a hundred of them.
  • Despawn on logout and respawn on join; players love the ritual.
  • Cap path updates to a few per second per pet to keep hundreds of pets cheap.

Questions people ask

Can pets fight?

Keep them passive — combat pets become the only viable choice. Utility and charm keep them fun without breaking balance.

How do I add a pet type?

Ask with its entity, perk, and unlock rule: "add an axolotl pet that grants brief water breathing nearby".

What happens in the void?

Teleport the pet to the owner; never let it die a silent, ticket-generating death.

If you can describe it, you can ship it. Take the prompt from this guide, tweak one detail, and build your version tonight.