Class ProtectionLib

java.lang.Object
com.ranull.graves.integration.ProtectionLib

public final class ProtectionLib extends Object
Provides integration with ProtectionLib to check if a player can build at a specific location.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Graves
     
    private final org.bukkit.plugin.Plugin
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProtectionLib(Graves plugin, org.bukkit.plugin.Plugin protectionLibPlugin)
    Constructs a new ProtectionLib instance with the specified Graves plugin and ProtectionLib plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canBuild(org.bukkit.Location location, org.bukkit.entity.Player player)
    Checks if a player is allowed to build at the specified location.

    Methods inherited from class java.lang.Object

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

    • plugin

      private final Graves plugin
    • protectionLibPlugin

      private final org.bukkit.plugin.Plugin protectionLibPlugin
  • Constructor Details

    • ProtectionLib

      public ProtectionLib(Graves plugin, org.bukkit.plugin.Plugin protectionLibPlugin)
      Constructs a new ProtectionLib instance with the specified Graves plugin and ProtectionLib plugin.
      Parameters:
      plugin - The main Graves plugin instance.
      protectionLibPlugin - The ProtectionLib plugin instance.
  • Method Details

    • canBuild

      public boolean canBuild(org.bukkit.Location location, org.bukkit.entity.Player player)
      Checks if a player is allowed to build at the specified location. Uses FurnitureLib integration if available; otherwise, reflects ProtectionLib's method.
      Parameters:
      location - The location to check.
      player - The player attempting to build.
      Returns:
      True if the player can build at the location, false otherwise.