DespawnLimits

Resolves how many despawn locations a player is allowed to own. Precedence:

  1. limits.unlimited: true in config, or the despi.limit.bypass permission → no cap.

  2. The highest despi.limit.<n> permission the player holds (assign these to LuckPerms/other groups for per-rank caps).

  3. The configured limits.default.

Kept as a small, permission-reading utility so command code stays declarative.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun canAddAnother(player: Player, currentCount: Int, settings: LimitSettings): Boolean

Whether player is under their cap and may register another location.

Link copied to clipboard
fun resolve(player: Player, settings: LimitSettings): Int

The maximum number of locations player may own. Int.MAX_VALUE means unlimited.