Skip to content

Latest commit

 

History

History
64 lines (41 loc) · 1.54 KB

ProtectionHelper.md

File metadata and controls

64 lines (41 loc) · 1.54 KB

Documentation

public static boolean isLockable(Block b)

Use this Method to check if Block is protectable

  • Parameters: b — Block
  • Returns: boolean

public static boolean isOpenable(Block b)

Use this Method to check if a Block is an instance of Openable

  • Parameters: b — Block
  • Returns: boolean

public static boolean hasPermission(Block b, Player p)

Use this Method to check if Player has Permission for that Block

  • Parameters:
    • b — Block
    • p — Player
  • Returns: boolean

public static boolean hasPermission(ProtectionEntry pre, Player p)

Use this Method to check if Player has Permission for that ProtectionEntry

  • Parameters:
    • pre — ProtectionEntry
    • p — Player
  • Returns: boolean

public static boolean hasFlag(ProtectionEntry protection, ProtectionFlags flag)

Use this with an ProtectionEntry to check ifa Protection has a Specific Flag

  • Parameters:
    • protection — ProtectionEntry
    • flag — ProtectionFlags
  • Returns:

public static boolean hasRights(ProtectionEntry protection, int player_fk)

Use this Method to check if Player has Rights to the ProtectionEntry

  • Parameters:
    • protection — ProtectionEntry
    • player_fk
  • Returns:

public static Location getLocationFromBlockAlternateForDoor(Block b)

  • Parameters: b
  • Returns:

public static Block getOtherPart(Door door, Block block)

  • Parameters:
    • door
    • block
  • Returns: