Pasture Limiter (Per Group limit) banner
Pasture Limiter (Per Group limit) icon

Pasture Limiter (Per Group limit)

Mod Request: Smart Global Block Limiter with Multi-Block Fix (LuckPerms Support) Core Concept: I need a server-side mod (Fabric/Arclight compatible) that...

00
fabricServer1.21.1mod

What this mod does

  • Server-only Fabric mod that limits how many configured blocks each player can place; currently it watches the Cobblemon pasture block (cobblemon:pasture).
  • Limits are pulled from LuckPerms metadata. The mod checks blockslimiter.limit.<namespace>.<path> first (for the pasture that is blockslimiter.limit.cobblemon.pasture), then falls back to blockslimiter.limit. Values are integers; negative numbers mean unlimited and missing values default to 0.
  • Players with the blockslimiter.bypass permission are exempt from all limits.
  • Placements are intercepted in interactBlock, so multi-block structures are counted once per use instead of once per block. Successful placements record the owner and position in persistent storage and are decremented when the block is broken.
  • Counts are global across all worlds/dimensions, with periodic cleanup to drop entries for blocks that no longer exist.

Notes and limitations

  • The only limited block out of the box is cobblemon:pasture. Add more by extending the limited block set in the code.
  • If LuckPerms is not present or no meta is set, the default limit of 0 applies (no placements) unless blockslimiter.bypass is granted.
  • Cleanup skips blocks in unloaded chunks until those chunks are loaded again.

Server Validation

Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.