Class Counter
java.lang.Object
com.sk89q.worldedit.function.block.Counter
- All Implemented Interfaces:
Filter,RegionFunction
Keeps a count of the number of times that
apply(BlockVector3) is
called.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(BlockVector3 position) Apply the function to the given position.intgetCount()Returns the number of blocks that have been counted.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.fastasyncworldedit.core.queue.Filter
applyChunk, finish, finishChunk, fork, joinMethods inherited from interface com.sk89q.worldedit.function.RegionFunction
applyBlock
-
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
Description copied from interface:RegionFunctionApply the function to the given position.- Specified by:
applyin interfaceRegionFunction- Parameters:
position- the position- Returns:
- true if something was changed
- Throws:
WorldEditException- thrown on an error
-