Skip to content

Rule Inspection

alexisleder edited this page Nov 8, 2026 · 2 revisions

Rule inspection — 1.5.0

Available in LederProtections 1.5.0.

/lep inspect [protection-id] [page] [wg|environment|role] opens an interactive chat panel for players and a read-only report for console. Without an ID, a player inspects the protection at their current position. Console must supply an ID. An invalid ID never falls back to the current protection.

Owners/co-owners can inspect their protections. Inspecting someone else's requires lederprotections.inspect.others (default: op), also included in lederprotections.admin. This permission does not grant editing rights, teleport bypass or container access. Tab completion filters IDs through the same visibility check. Nonexistent and unauthorized protections return the same generic response.

The report separates:

  • Explicit WorldGuard flags, region priority and parent. It does not flatten all inherited/global/overlapping WG flags into an effective access decision.
  • LP environment policies, with configured override, effective value and source.
  • LP action rules for each role, with configured override, effective value and source.

LP and WorldGuard both remain in use. WorldGuard stores/manages the backing region; LP enforces detailed player-role/action and environment rules. /rg info only shows WorldGuard's flags. LP's rules are not missing just because that screen does not list them.

passthrough: ALLOW is intentional when worldguard.passthrough: true: it avoids generic WorldGuard region protection blocking the finer LP rules. It does not mean LP has disabled protection, nor does an LP ALLOW guarantee that another plugin or overlapping WorldGuard region will permit an action.

The report shows whether LP rule/environment engines are enabled. Stored overrides are not enforced by a disabled engine; effective values reflect that distinction.

/lep check now also detects differences in WG shape/bounds, owner domain, member domain (LP members + co-owners), and passthrough mode. Named players/groups added manually to WG domains are reported as differences. A difference is diagnostic information, not proof that all manually configured values are erroneous.

With passthrough disabled in LP, explicit WG ALLOW is reported for review; LP does not forcibly set DENY or erase custom flags. /lep check never repairs these differences automatically. Review backups and use the existing explicit repair commands only for the operations they support. There is no new automatic bounds or passthrough repair.

/lep check also reports menu validation status and measured menu-render average/max times since startup. These timings measure the presentation/opening stage, not a full-server benchmark or client rendering time.

Español

/lep inspect [id] [página] permite ver las reglas reales de LP y las flags explícitas de WorldGuard por separado. El dueño y los codueños pueden consultar sus protecciones; para consultar las de otros se necesita lederprotections.inspect.others o el permiso administrativo.

Que /rg info muestre passthrough: ALLOW es normal con esa opción activada: las reglas detalladas las controla LP. WorldGuard sigue gestionando la región. No es necesario copiar todas las reglas de LP a flags de WG.

/lep check detecta diferencias en límites, dueños, miembros y passthrough, pero no cambia datos. Los valores heredados, personalizados y efectivos aparecen en la consulta. Otros plugins o regiones solapadas aún pueden denegar una acción.

Interactive chat panel

Players get WorldGuard, environment and role tabs, plus Previous/Next/Refresh. Each LP rule shows its effective state and whether it inherits the global default. Allow/Block/Inherit controls save an explicit state and refresh the same page. Inherit removes that single override; it does not reset every rule for the role.

Owners and administrators can edit. Co-owners need their protection's canEditFlags setting. inspect.others alone remains read-only. Every click reloads the record and checks current ownership/permissions. A button whose expected override no longer matches is rejected and refreshed; repeated clicks cannot toggle the state back. Disabled engines cannot be edited here. Persistence failures do not reindex or report success. WorldGuard flags remain read-only references.

Commands behind buttons use encoded IDs; display names cannot become command text. Console keeps the original paginated plain-text report. Bedrock chat-click support depends on the client/bridge; use LP's existing GUIs if those controls are unavailable.

Implementation uses the Spigot Chat Component API and does not require Paper or a new dependency.

Pruebas en servidor

  1. Usa /lep inspect dentro de tu protección o /lep inspect .
  2. Abre Entorno y un rol, cambia una regla y comprueba su efecto en juego.
  3. Pulsa Heredar: debe recuperar el valor global, sin cambiar otras reglas.
  4. Repite un clic antiguo: no debe deshacer el cambio recién guardado.
  5. Cambia dueño/permisos con el panel abierto: el antiguo dueño debe perder acceso.
  6. Prueba un usuario con inspect.others: debe ver el panel sin controles de edición.
  7. Comprueba las páginas, los colores y los clics en los clientes Java admitidos.
  8. Verifica que la pestaña WorldGuard no modifica flags ni passthrough.

Clone this wiki locally