Admin Panel & Pet Creator
Admin Panel & Pet Creator
Section titled “Admin Panel & Pet Creator”The Pet System includes a full admin command suite and an in-game Pet Creator UI for server administrators.
Permission required: ks.pet.admin
Pet Creator UI
Section titled “Pet Creator UI”The Pet Creator is an interactive UI page that allows admins to build custom pets with full control over every parameter. Open it with:
/kspetadmin creatoror
/kspetadmin createCreator Fields
Section titled “Creator Fields”| Field | Type | Description |
|---|---|---|
| Pet Type | Dropdown | Select from all registered pet types (shows display name, module, and rarity) |
| Level | Text field | Pet level (1-100) |
| Nickname | Text field | Custom display name (optional, defaults to type display name) |
| Target Player | Text field | Player to receive the pet (optional, defaults to self) |
| Stat Slots (x5) | Dropdown + Text fields | Up to 5 stats, each with type, base value, per-level growth, and unlock level |
Available Stat Types
Section titled “Available Stat Types”The creator dropdown includes all 12 stat types:
| Stat Type | Display Name |
|---|---|
damage_bonus | Damage Bonus |
crit_chance | Crit Chance |
armor_bonus | Armor Bonus |
max_health | Max Health |
speed_bonus | Speed Bonus |
pickup_radius | Pickup Range |
xp_bonus | XP Bonus |
loot_luck | Loot Luck |
life_steal | Life Steal |
stamina_regen | Stamina Regen |
mana_regen | Mana Regen |
thorns | Thorns |
Max Stats Button
Section titled “Max Stats Button”Clicking Max Stats automatically fills in optimal stat values:
- Sets level to the pet type’s max level
- Sets all stat unlock levels to 1 (all stats available immediately)
- Applies maximum quality values based on the pet’s rarity
- Respects combat-only stat pool for combat pets
- Uses rarity rules to determine how many stat slots are available
Create Button
Section titled “Create Button”Clicking Create validates all fields, creates the pet in the database, generates the summon item (egg/rune/horn) with proper metadata, and places it in the target player’s inventory.
A status message appears at the bottom of the page showing success or error details.
Admin Commands Reference
Section titled “Admin Commands Reference”All admin commands require the ks.pet.admin permission.
/kspetadmin give <player> <type>
Section titled “/kspetadmin give <player> <type>”Gives a pet egg/rune/horn to the specified player. The pet is created with default stats rolled based on rarity, and the item is placed directly into the player’s inventory.
/kspetadmin give Steve wolf/kspetadmin give Steve wolf_combat/kspetadmin give Steve rex_cave_mount/kspetadmin remove <player> <type>
Section titled “/kspetadmin remove <player> <type>”Removes a pet from a player’s data. If the pet is currently active, it is despawned first.
/kspetadmin remove Steve wolf/kspetadmin setlevel <player> <type> <level>
Section titled “/kspetadmin setlevel <player> <type> <level>”Sets a pet’s level directly. XP is reset to 0. Any stat unlock levels that were skipped are rolled automatically. Buffs are reapplied if the pet is active.
/kspetadmin setlevel Steve wolf 50:::info Multi-Word Type IDs Type IDs with underscores can be written with spaces. The command joins all words between player name and the trailing number with underscores automatically.
/kspetadmin setlevel Steve dragon frost 30 is equivalent to /kspetadmin setlevel Steve dragon_frost 30
:::
/kspetadmin addxp <player> <type> <amount>
Section titled “/kspetadmin addxp <player> <type> <amount>”Grants XP to a specific pet. Triggers level-ups and stat rolls as normal.
/kspetadmin addxp Steve wolf 5000/kspetadmin reroll [<player> <type> | combat | collector | mount]
Section titled “/kspetadmin reroll [<player> <type> | combat | collector | mount]”Clears all stats and re-rolls them from scratch based on rarity. Two usage forms:
/kspetadmin reroll Steve wolf -- Target a specific player's pet/kspetadmin reroll combat -- Reroll your own active combat pet/kspetadmin reroll collector -- Reroll your own active collector pet/kspetadmin reroll -- Reroll your active pet (any type)/kspetadmin maxout [<player> <type> | combat | collector | mount]
Section titled “/kspetadmin maxout [<player> <type> | combat | collector | mount]”Sets a pet to its maximum level and ensures all stat slots are filled. Missing stats for unlock levels are rolled automatically. Two usage forms (same as reroll).
/kspetadmin maxout Steve wolf/kspetadmin maxout combat/kspetadmin inspect hand
Section titled “/kspetadmin inspect hand”Inspects the pet item currently held in the admin’s hand. Shows full metadata including instance ID, type, level, XP, stats (with base values and per-level growth), filter rules, and combat mode.
/kspetadmin inspect hand/kspetadmin inspect <player>
Section titled “/kspetadmin inspect <player>”Inspects all pet items in a player’s inventory. Lists every egg/rune/horn found across hotbar, storage, and backpack, plus the player’s cached pet data (active pets, pet count).
/kspetadmin inspect Steve/kspetadmin reload
Section titled “/kspetadmin reload”Reloads config.json, stat-pool.json, all pet type definitions, and localization files without restarting the server.
/kspetadmin reload/kspetadmin list
Section titled “/kspetadmin list”Lists all registered pet types with their ID, display name, rarity, and max level.
/kspetadmin list/kspetadmin cleanup
Section titled “/kspetadmin cleanup”Force-removes all KS-role NPC entities from the default world. Useful for cleaning up orphaned pet NPCs after crashes or bugs. Also despawns all tracked active pets.
/kspetadmin cleanup/kspetadmin cleanworld
Section titled “/kspetadmin cleanworld”Scans all loaded worlds and removes orphaned KS-role NPC entities. More thorough than cleanup for multi-world servers.
/kspetadmin cleanworld/kspetadmin despawnall
Section titled “/kspetadmin despawnall”Despawns all currently active pet NPCs for all online players. Player data is preserved.
/kspetadmin despawnallLoot Luck Blacklist UI
Section titled “Loot Luck Blacklist UI”/kspetadmin lootluckOpens a UI for editing the global Loot Luck blacklist. Item ids matching any pattern in the list will not roll the Loot Luck duplication chance, even when picked up legitimately. Useful to prevent specific items (junk blocks, high-tier gear, …) from ever being duplicated by loot_luck stat rolls.
This is independent from the per-player pickup filter — the pet still collects matched items, the player still gets exactly one of each. Only the duplication roll is suppressed.
UI Layout
Section titled “UI Layout”| Section | Function |
|---|---|
| Quick Toggles | One-click toggles for six common categories: *_Tool_*, *_Weapon_*, *_Armor_*, *_Consumable_*, Ore_*, Resource_*. A > prefix on the button label indicates the pattern is active. |
| Add Pattern | Text field + Add button for custom patterns. Pressing Enter in the field also commits. |
| Active Patterns | Paginated list (12 per page) of all current patterns. Each row has a x delete button. Clear button at the top removes all patterns. |
Pattern Syntax
Section titled “Pattern Syntax”| Pattern | Behavior | Example matches |
|---|---|---|
Dirt | Substring (case-insensitive) — patterns without * match any item id containing the text | Dirt, DirtBlock, Dirt_Coarse |
*_Tool_* | Wildcard — * becomes .* in regex | Item_Tool_Pickaxe, Custom_Tool_Wrench |
Ore_* | Wildcard prefix | Ore_Iron, Ore_Gold |
*_Spear | Wildcard suffix | Wood_Spear, Iron_Spear |
All matching is case-insensitive.
Persistence
Section titled “Persistence”Every mutation (toggle, add, remove, clear) live-saves to plugins/Pets/data/loot_luck_blacklist.json. The compiled regex cache is rebuilt on every change, so edits take effect on the next pickup tick — no /kspetadmin reload needed.
The file is intentionally separate from config.json to avoid the UI’s live-write clobbering parallel manual edits to other config fields.
Troubleshooting Tips
Section titled “Troubleshooting Tips”| Problem | Solution |
|---|---|
| Orphaned pet NPCs after crash | Run /kspetadmin cleanup or /kspetadmin cleanworld |
| Pet data seems wrong | Use /kspetadmin inspect <player> to check metadata |
| Stats seem broken | Use /kspetadmin reroll <player> <type> to re-roll stats |
| Need to test a max-level pet | Use /kspetadmin maxout or the Pet Creator UI |
| Pet egg missing from inventory | The give command places the item directly; check hotbar/storage |