WerseMobCounter
A lightweight Minecraft plugin that counts mobs inside WorldGuard regions and exposes the numbers via PlaceholderAPI. It also includes a tiny “Actions” engine that can run console commands when a numeric condition (based on placeholders) is met.
Features
Count mobs inside a specific WorldGuard region
Vanilla mobs
MythicMobs (all)
MythicMobs by type (e.g. skeletal_knight)
Built-in Actions scheduler:
Evaluate a placeholder expression on a fixed tick interval
Run console commands when the condition is true- Per-action ENABLED toggle
Requirements
Paper/Spigot (1.20–1.21 recommended)
WorldGuard
PlaceholderAPI
MythicMobs (only required for Mythic counts)
Tip: If these are hard requirements for your environment, list them under depend: in plugin.yml. If you want to allow running without some of them, use softdepend: and handle missing features gracefully.
Installation
Drop WerseMobCounter.jar into plugins/.
Restart the server (full restart; avoid /reload).- Edit config.yml if needed, then restart again.
Placeholders
All placeholders follow:
Code (Text):
%wersemobscounter_<WORLDGUARD_REGION_ID>mobs<variant>%
%wersemobscounter_<WG_ID>_mobs_total% — total mobs in the region (vanilla + Mythic)
%wersemobscounter_<WG_ID>[I]mobs_vanilla% — vanilla mobs only (non-Mythic)- %wersemobscounter[/I]<WG_ID>[I]mobs_mythick_total% — all MythicMobs in the region
- %wersemobscounter[/I]<WG_ID>[I]mobs_mythick[/I]<MYTHIC_TYPE_ID>% — MythicMobs of a specific type
Note: The parser treats everything between wersemobscounter_ and [I]mobs[/I] as the region name, so IDs like arena-pvp or town_center work out of the box.
Examples
Code (Text):
%wersemobscounter_spawn_mobs_vanilla%
%wersemobscounter_arena-pvp_mobs_mythick_total%
%wersemobscounter_town_center_mobs_mythick_skeletal_knight%
Code (Text):
/papi parse me %wersemobscounter_spawn_mobs_vanilla%
Actions (conditional console commands)
Define actions in config.yml. Each action:
has an ENABLED flag,
checks CONDITION every TRY_EVERY ticks,- runs all COMMANDS_IF_TRUE as console when the condition evaluates to true.
Supported operators
Numeric comparisons: >, <, >=, <=, =, ==
Conditions are parsed as:
Code (Text):
<left_numeric_expression> <operator> <number_literal>
Code (Text):
%wersemobscounter_<WG_ID>_mobs_mythick_total% > 0
Code (Text):
ACTIONS:
"1":
ENABLED: true
CONDITION: "%wersemobscounter_test123_mobs_mythick_total% > 0"
TRY_EVERY: 20 # ticks (20 = ~1 second)
COMMANDS_IF_TRUE:
- "say There is at least 1 Mythic mob in region test123!"
- "say (Triggered by WerseMobCounter)"
"2":
ENABLED: false
CONDITION: "%wersemobscounter_arena_mobs_vanilla% >= 5"
TRY_EVERY: 40
COMMANDS_IF_TRUE:
- "say Region 'arena' has at least 5 vanilla mobs!"
Code (Text):
DEBUG_ACTIONS: true
Code (Text):
[Actions][debug] 1 => TRUE
Placeholder always returns 0
Verify the exact WorldGuard region ID (/rg list).
Make sure the region exists in the world you expect.
For Mythic types, confirm the internal type ID in MythicMobs.
Ensure ENABLED: true, the condition is numeric and resolves correctly, and TRY_EVERY > 0.
Turn on DEBUG_ACTIONS to see evaluations.
Missing plugin warnings- Check your startup log. If you used depend:, the server won’t enable WerseMobCounter without the listed dependencies.
Notes
Placeholders are implemented to work without a player context by using onRequest(OfflinePlayer, ...) and requiresPlayer() == false.
Region parsing is robust: the engine looks for the pivot substring [I]mobs[/I] and treats everything before it as the region name.
Enjoy and feel free to tweak the config to your needs!
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.20.6, 1.21
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
WerseMobCounter is a free Minecraft Java mod. Compatible with Minecraft 1.20.6, 1.21. Downloaded 9 times (via Spigot). Download it and open it directly in the game.