Docs

Pets

Collectable companions that level up with the blocks their owner mines and give passive bonuses. Only one pet is active at a time.

Configurationpets.yml
Datadata/pets.yml
Modulepets

Why a single active pet

Players unlock many pets but only benefit from one. Switching companions doesn't erase progress, but the previous pet's levels go unused. That single restriction turns the collection into a decision and stops bonuses from stacking until they break the economy.


How they look

By default the active pet is a head floating diagonally behind its owner, following smoothly with a gentle bob and showing its name and level. display.mode in pets.yml lets you choose:

ModeVisual
HEADFloating head
PARTICLESA small particle trail, no entity
BOTHHead and particles
NONEBonuses only

The head is one invisible marker armor stand per player with an active pet: no hitbox, no AI, no physics and never saved into the world.

yaml
display:
  mode: HEAD
  update-ticks: 2
  offset:
    side: 0.8
    back: 0.6
    height: 1.9
  bob: 0.12
  show-name: true
particles:
  enabled: true
  type: HAPPY_VILLAGER

Each pet's head

Each pet picks its head in pets.yml; the first available option is used:

  1. head.database-id: a HeadDatabase id, if the plugin is installed
  2. head.texture: a base64 texture value from any head website
  3. head.owner: the name of a player whose skin is used

The included pets use Mojang's official MHF_ heads.


Commands

CommandDescription
/petsOpen the collection menu
/pet listUnlocked pets, with levels
/pet equip <pet>Bring out a pet
/pet unequipPut away the active pet
/pet info [pet]Exact level, experience and bonuses
/pet typesEvery pet in the game and its rarity
/pet give <player> <pet>Admin: unlock a pet for someone
/pet addxp <player> <pet> <amount>Admin: give experience

Aliases: /pets, /mascota, /mascotas.

PermissionDefaultGrants
pulseprison.petseveryoneThe collection and every player subcommand
pulseprison.pets.adminop/pet give and /pet addxp

Where pets come from

There is no built in drop source, so the module works with any crate, vote or store plugin. Hand them out with a console command:

/pet give <player> <pet>

Put it in a crate reward, in execute-on-rankup in ranks.yml, in reward-commands in rebirths.yml or in a vote listener.

If the player already owns that pet, it turns into experience (duplicate-experience, 250 by default), so duplicates are still a reward.


Included pets

IDRarityEffect per levelHead
rockyCOMMONSELL_BONUS +0.4%MHF_Golem
sparkyUNCOMMONTOKEN_BONUS +0.5%MHF_Slime
glimmerRAREGEM_BONUS +0.6%MHF_Enderman
scholarEPICEXP_BONUS +0.6%MHF_Villager
boltLEGENDARYROBOT_OUTPUT +0.6%MHF_Blaze
vaultMYTHICSELL_BONUS +0.4% and TOKEN_BONUS +0.3%MHF_Chest

All of them go up to level 25.


Levels

The active pet earns experience-per-block (1 by default) for every block its owner mines. Each level costs experience.base × growth^(level-1), configured per pet. A rare pet should have a higher base and growth than a common one.


Effects

EffectDoes
SELL_BONUSMore money for every block sold
TOKEN_BONUSMore tokens from enchants
GEM_BONUSMore gems from enchants
EXP_BONUSThe pickaxe levels up faster
ROBOT_OUTPUTMore production from the owner's robots

Values are per level, as a decimal fraction: 0.004 is +0.4% per level, so a level 25 pet gives +10%. Bonuses are really paid on every block, not just shown.


Placeholders

PlaceholderReturns
%pulseprison_pet_name%Active pet name, or None
%pulseprison_pet_display%The same, with the rarity color
%pulseprison_pet_level%Active pet level
%pulseprison_pet_rarity%Active pet rarity
%pulseprison_pet_count%Unlocked pets
%pulseprison_pet_total%Pets that exist
%pulseprison_pet_bonus_<effect>%Current bonus of that effect, in percent

API

java
PetService pets = PulsePrisonProvider.get().pets();

pets.grant(player, "glimmer");
pets.setActive(player.getUniqueId(), "glimmer");
double bonus = pets.getBonus(player.getUniqueId(), PetEffect.SELL_BONUS);

Events: PetUnlockEvent (cancellable) and PetLevelUpEvent. See Events.

Pets | PulsePrison Core Docs