Class BlockUtil

java.lang.Object
com.palmergames.bukkit.util.BlockUtil

public class BlockUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static List<org.bukkit.block.BlockFace>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    sameOwner(org.bukkit.block.Block b1, org.bukkit.block.Block b2)
    Are the blocks owned by the same resident or same town (if not player-owned.)
    static boolean
    sameOwnerOrHasMayorOverride(org.bukkit.block.Block b1, org.bukkit.block.Block b2, org.bukkit.entity.Player player)
    Are the blocks owned by the same resident, same town, or does the given Player have the towny.command.plot.asmayor permission node used to discern mayor-like priviledges.
    static boolean
     
    static boolean
    sameWorldCoord(org.bukkit.block.Block b1, org.bukkit.block.Block b2)
     

    Methods inherited from class java.lang.Object

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

    • CARDINAL_BLOCKFACES

      public static List<org.bukkit.block.BlockFace> CARDINAL_BLOCKFACES
  • Constructor Details

    • BlockUtil

      public BlockUtil()
  • Method Details

    • sameOwner

      public static boolean sameOwner(org.bukkit.block.Block b1, org.bukkit.block.Block b2)
      Are the blocks owned by the same resident or same town (if not player-owned.)
      Parameters:
      b1 - Block 1
      b2 - Block 2
      Returns:
      True if the blocks have the same owner.
    • sameOwnerOrHasMayorOverride

      public static boolean sameOwnerOrHasMayorOverride(org.bukkit.block.Block b1, org.bukkit.block.Block b2, org.bukkit.entity.Player player)
      Are the blocks owned by the same resident, same town, or does the given Player have the towny.command.plot.asmayor permission node used to discern mayor-like priviledges.
      Parameters:
      b1 - Block 1
      b2 - Block 2
      player - Player who is acting.
      Returns:
      True if the blocks have the same owner, or a mayor-like player has override.
    • sameWorldCoord

      public static boolean sameWorldCoord(org.bukkit.block.Block b1, org.bukkit.block.Block b2)
    • sameWorldCoord

      public static boolean sameWorldCoord(WorldCoord wc, WorldCoord wc2)