Class Counter

java.lang.Object
com.sk89q.worldedit.function.block.Counter
All Implemented Interfaces:
RegionFunction

public class Counter extends Object implements RegionFunction
Keeps a count of the number of times that apply(BlockVector3) is called.
  • Constructor Details

    • Counter

      public Counter()
  • Method Details

    • getCount

      public int getCount()
      Returns the number of blocks that have been counted.
      Returns:
      the number of blocks
    • apply

      public boolean apply(BlockVector3 position) throws WorldEditException
      Description copied from interface: RegionFunction
      Apply the function to the given position.
      Specified by:
      apply in interface RegionFunction
      Parameters:
      position - the position
      Returns:
      true if something was changed
      Throws:
      WorldEditException - thrown on an error