Class Protections

java.lang.Object
dev.sefiraat.sefilib.protections.Protections

public final class Protections extends Object
This class contains static methods for dealing with Slimefun4's protections.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    hasPermission(UUID player, Block block, io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
    Checks if the given player is allowed to interact with the given Block.
    static boolean
    hasPermission(UUID player, Location location, io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
    Checks if the given player is allowed to interact with the given Block.
    static boolean
    hasPermission(Player player, Block block, io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
    Checks if the given Player is allowed to interact with the given Block.
    static boolean
    hasPermission(Player player, Location location, io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
    Checks if the given Player is allowed to interact with the given Block.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • hasPermission

      public static boolean hasPermission(@Nonnull Player player, @Nonnull Block block, @Nonnull io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
      Checks if the given Player is allowed to interact with the given Block.
      Parameters:
      player - The Player to check.
      block - The Block to check.
      interaction - The Interaction type to check.
      Returns:
      True if the Player is allowed to interact with the Block.
    • hasPermission

      public static boolean hasPermission(@Nonnull Player player, @Nonnull Location location, @Nonnull io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
      Checks if the given Player is allowed to interact with the given Block.
      Parameters:
      player - The Player to check.
      location - The Location of the block to check.
      interaction - The Interaction type to check.
      Returns:
      True if the Player is allowed to interact with the Block.
    • hasPermission

      public static boolean hasPermission(@Nonnull UUID player, @Nonnull Block block, @Nonnull io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
      Checks if the given player is allowed to interact with the given Block.
      Parameters:
      player - The UUID of the OfflinePlayer to check.
      block - The Block to check.
      interaction - The Interaction type to check.
      Returns:
      True if the player is allowed to interact with the Block.
    • hasPermission

      public static boolean hasPermission(@Nonnull UUID player, @Nonnull Location location, @Nonnull io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction interaction)
      Checks if the given player is allowed to interact with the given Block.
      Parameters:
      player - The UUID of the OfflinePlayer to check.
      location - The Location of the block to check.
      interaction - The Interaction type to check.
      Returns:
      True if the player is allowed to interact with the Block.