Skip to content

Rules System

Alexisleder edited this page Jul 8, 2026 · 1 revision

Rules System

This page explains how the LederProtections rule system works.

LederProtections uses WorldGuard as the region backend, but it also includes its own internal rule engine to control player actions more precisely inside protections.


What is the Rule System?

The rule system decides whether a player or action is allowed inside a protection.

It checks things such as:

  • who is performing the action;
  • where the action happens;
  • what protection contains the location;
  • what role the player has;
  • what rule applies to that action;
  • whether the action crosses protection boundaries;
  • whether the actor has bypass permission.

WorldGuard and LederProtections

LederProtections uses WorldGuard regions as the base region system.

However, LederProtections also adds its own logic for:

  • roles;
  • members;
  • co-owners;
  • visitors;
  • blocked players;
  • GUI management;
  • economy features;
  • upgrades;
  • protected interactions;
  • anti-exploit checks.

This means WorldGuard handles region storage, while LederProtections handles the protection behavior that players interact with.


Role-Based Rules

Rules are based on the player's role inside a protection.

Common roles:

Role Description
Owner Main owner of the protection.
Co-owner Trusted player with elevated access.
Member Allowed player with normal access.
Visitor Player without special access.
Blocked player Player explicitly denied from the protection.
Administrator Staff member with plugin permissions.

Each role may have different permissions inside the protected area.


Common Protected Actions

LederProtections can protect many common actions.

Action Description
Block break Prevents unauthorized players from breaking blocks.
Block place Prevents unauthorized players from placing blocks.
Container access Protects chests and similar containers.
Doors and trapdoors Controls door and trapdoor usage.
Buttons and levers Controls redstone interaction blocks.
Item pickup Controls item pickup behavior in protected areas.
PvP Controls player damage and knockback behavior.
Pistons Prevents piston-based protection bypasses.
Hoppers Prevents item extraction bypasses.
Dispensers and droppers Prevents automated interaction bypasses.
Explosions Protects against TNT and explosion damage.
Fire Protects against unauthorized fire behavior.
Fluids Controls water and lava behavior.
Projectiles Handles projectile damage crossing protection borders.

Rule Decision Flow

When an action happens, LederProtections follows a general process:

  1. Detect the action.
  2. Find the affected location.
  3. Check if the location is inside a protection.
  4. Determine the actor.
  5. Determine the actor's role in the protection.
  6. Check if the actor has bypass permission.
  7. Check the rule for that action and role.
  8. Allow or deny the action.
  9. Send a message if needed.
  10. Preserve or rollback behavior when needed.

Example: Block Breaking

When a player tries to break a block inside a protection:

  1. LederProtections checks the block location.
  2. It finds the protection covering that location.
  3. It checks the player's role.
  4. It checks whether that role can break blocks.
  5. If allowed, the block break continues.
  6. If denied, the block break is cancelled.

Example:

Player role Break blocks
Owner Allowed
Co-owner Depends on rules
Member Depends on rules
Visitor Usually denied
Blocked player Denied

Example: Container Access

When a player tries to open a chest inside a protection:

  1. LederProtections checks the chest location.
  2. It checks the protection owner/member data.
  3. It checks the player's role.
  4. It allows or denies the interaction.

Example:

Player role Container access
Owner Allowed
Co-owner Usually allowed
Member Usually allowed
Visitor Usually denied
Blocked player Denied

Example: PvP and Knockback

LederProtections can block PvP damage and related knockback behavior inside protected areas.

If PvP is denied:

  • damage is cancelled;
  • immediate knockback is prevented;
  • repeated denied-message spam is reduced.

This helps prevent players from attacking or pushing others inside protected areas.


Example: Dispenser Projectiles

LederProtections protects against dispenser-fired projectiles crossing protection borders.

Example behavior:

Projectile case Result
Dispenser outside shoots player inside a protection Damage blocked
Dispenser inside shoots player outside the protection Damage blocked
Dispenser in one protection shoots player in another protection Damage blocked
Dispenser and target are in the same protection context Normal behavior
Dispenser and target are both outside protections Normal behavior

This prevents dispenser arrows from being used as a protection bypass.


Boundary-Crossing Protection

Some actions are dangerous because they can cross protection borders.

Examples:

  • pistons pushing blocks into a protection;
  • sticky pistons pulling blocks out of a protection;
  • hoppers extracting items from protected containers;
  • dispensers firing projectiles into protected areas;
  • fluids flowing into protected regions;
  • explosions affecting protected blocks.

LederProtections checks these cases to prevent bypasses.


Automation Protection

LederProtections includes checks for automated systems.

System Protection goal
Pistons Prevent pushing or pulling across protection borders.
Sticky pistons Prevent block theft or protected block movement.
Hoppers Prevent item extraction from protected inventories.
Dispensers Prevent protected interaction or projectile bypasses.
Droppers Prevent automated transfer bypasses.
Explosions Prevent protected block damage.

Bypass Permission

Some administrators may need to bypass protection rules.

Permission:

lederprotections.bypass.rules

This permission should only be given to trusted staff.

Do not give this permission to normal players.

Recommended use:

User type Recommended
Server owner Yes
Trusted administrator Maybe
Moderator Usually no
Normal player No

Admin Tools vs Rule Bypass

Administrative tools and rule bypass are different.

Permission / Tool Purpose
/lep admin View and manage protections through admin tools.
lederprotections.admin Access plugin administrative commands.
lederprotections.bypass.rules Bypass the protection rule engine.

A staff member can have admin tools without necessarily bypassing every protection rule.

This separation is recommended for safer server management.


Visitor Rules

Visitors are players who do not have a special role inside a protection.

Common visitor behavior:

Action Typical result
Break blocks Denied
Place blocks Denied
Open chests Denied
Use doors Depends on rules
Use buttons/levers Depends on rules
Attack players Usually denied
Pick up items Depends on rules

Server owners can configure behavior depending on their preferred gameplay style.


Member Rules

Members are trusted players with normal protection access.

Common member behavior:

Action Typical result
Break blocks Depends on rules
Place blocks Depends on rules
Open chests Usually allowed
Use doors Usually allowed
Use buttons/levers Usually allowed
Manage members Usually denied
Transfer ownership Denied

Members are useful for friends, teammates or base residents.


Co-owner Rules

Co-owners are trusted players with elevated access.

Common co-owner behavior:

Action Typical result
Break blocks Usually allowed
Place blocks Usually allowed
Open chests Usually allowed
Manage members Depends on configuration
Edit rules Depends on configuration
Transfer ownership Usually denied or owner-only

Only trusted players should be promoted to co-owner.


Owner Rules

Owners have the highest normal protection authority.

Common owner behavior:

Action Typical result
Break blocks Allowed
Place blocks Allowed
Open chests Allowed
Manage members Allowed
Manage co-owners Allowed
Upgrade protection Allowed if permitted
Transfer ownership Allowed if permitted
Remove protection Allowed

Some actions may still depend on permissions or configuration.


Blocked Player Rules

Blocked players are explicitly denied from a protection.

Common blocked-player behavior:

Action Typical result
Break blocks Denied
Place blocks Denied
Open chests Denied
Use protected interactions Denied
Attack protected players Denied

Blocked player behavior is usually stricter than normal visitor behavior.


Performance Notes

LederProtections is designed with performance in mind.

The plugin uses indexing and targeted checks so protection lookups can be efficient during common actions.

Recommended practices:

  • keep the plugin updated;
  • avoid unnecessary bypass permissions;
  • test rule changes before applying them to production;
  • use /lep check after major configuration changes;
  • watch the console for warnings after updates.

Testing Rule Behavior

Recommended tests after configuration changes:

Test Expected result
Visitor breaks block inside protection Denied
Member opens allowed chest Allowed
Visitor opens protected chest Denied
Co-owner manages members Depends on configuration
Piston pushes block into protection Blocked
Hopper extracts from protected chest Blocked
Dispenser shoots arrow into protection Damage blocked
TNT explodes near protection Protected blocks remain safe
PvP inside protected area Follows protection rules

Troubleshooting

A visitor can break blocks

Check that:

  • the region exists;
  • WorldGuard is loaded;
  • the internal rule engine is enabled;
  • the player does not have bypass permission;
  • the player is not accidentally added as member or co-owner.

A member cannot interact

Check that:

  • the player is actually a member;
  • the rule allows that action for members;
  • the protection data saved correctly;
  • the player is not blocked;
  • there are no console errors.

Pistons or hoppers bypass protections

Check that:

  • the internal rule engine is enabled;
  • the action is inside or crossing a protection;
  • no bypass permissions are being used;
  • the plugin is updated to the latest version.

PvP damage is not blocked

Check that:

  • the protection rule allows or denies PvP as intended;
  • both players are in the expected protection context;
  • no bypass permission is present;
  • another plugin is not overriding damage behavior.

Recommended Next Pages

Clone this wiki locally