Skip to content

[Bug]: No way to disable orbisguard.bypass permission within faction territories #14

@derrickmehaffy

Description

@derrickmehaffy

Plugin Version

0.6.0

Operating System

Linux (Debian/Ubuntu)

Bug Description

OrbisGuard-Mixins has a hardcoded permission check for orbisguard.bypass that completely bypasses all protection hooks before HyperFactions' hook is called. This means players with this permission (often given to faction owners/officers via permission plugins) can bypass HyperFactions zone and claim protections even when they shouldn't.

This is a design limitation that prevents HyperFactions from having full control over its own protection system.

Steps to Reproduce

  1. Give a player the orbisguard.bypass permission (e.g., faction owner role)
  2. Create a SafeZone with item pickup disabled
  3. Drop an item in the zone
  4. Have the player with orbisguard.bypass try to pick it up
  5. Item is picked up despite zone flag being OFF

Expected Behavior

HyperFactions should be able to control when bypass is allowed, independent of the orbisguard.bypass permission. The plugin's own bypass system (/f admin bypass) should be the authority for HyperFactions protections.

Logs

N/A - This is by design in OrbisGuard-Mixins, not an error.

Code Snippets

From PlayerItemEntityPickupSystemMixin (OrbisGuard-Mixins):

// Bypass check happens BEFORE hook is called
boolean bypass = player.hasPermission("orbisguard.bypass");
// ...
if (ctx.bypass()) {
    // Skip all protection checks - hook never called
    return container.addItemStack(itemStack);
}

Additional Information

Current Workaround:
Admins must manually set orbisguard.bypass: false in HyperPerms for roles that shouldn't bypass. This is:

  • Not intuitive (requires knowing about this hidden permission)
  • Error-prone (easy to forget when setting up new roles)
  • Doesn't integrate with HyperFactions' own bypass system

Proposed Solutions (require OrbisGuard developer coordination):

  1. Hook receives bypass flag - Let HyperFactions decide whether to honor it:
boolean check(UUID player, String world, double x, y, z, String mode, boolean hasBypass)
  1. Bypass check delegated to hook - Separate hook method for bypass:
boolean shouldBypass(UUID player, String world, double x, double y, double z)
  1. Configuration option - OrbisGuard-Mixins config to disable built-in bypass check

Affected Systems:

  • Auto pickup protection (when mixin works)
  • F-key harvest protection
  • Any other mixin-based protections with bypass checks

Action Required: Coordination with OrbisGuard developers to modify bypass handling.

Confirmation Checklist

  • I have checked the existing issues for duplicates.
  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions