public final class Cuboid extends Object
| Constructor and Description |
|---|
Cuboid(@NotNull org.bukkit.Location minimumLocation,
@NotNull org.bukkit.Location maximumLocation)
ctor.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull List<org.bukkit.block.Block> |
blocks()
obtains blocks inside the cuboid.
|
@NotNull org.bukkit.Location |
center()
obtains center of the cuboid.
|
@NotNull org.bukkit.Location |
centerBottom()
obtains center bottom of the cuboid.
|
@NotNull org.bukkit.Location |
getMaximumLocation()
obtains the maximum location of
this. |
@NotNull org.bukkit.Location |
getMinimumLocation()
obtains the minimum location of
this. |
boolean |
isIn(@NotNull org.bukkit.Location location)
checks if the given location is in the cuboid.
|
@NotNull List<org.bukkit.Location> |
locations()
obtains locations inside the cuboid.
|
@NotNull List<org.bukkit.block.Block> |
randomBlocks(int limit,
boolean duplicate)
obtains a random block list from the given limit.
|
@NotNull List<org.bukkit.Location> |
randomLocations(int limit,
boolean duplicate)
obtains a random location list from the given limit.
|
void |
removeAll()
removes all blocks where are in the cuboid.
|
void |
set(@NotNull org.bukkit.Material material)
sets all blocks inside the cuboid.
|
public Cuboid(@NotNull
@NotNull org.bukkit.Location minimumLocation,
@NotNull
@NotNull org.bukkit.Location maximumLocation)
minimumLocation - the minimum location.maximumLocation - the maximum location.@NotNull public @NotNull org.bukkit.Location getMinimumLocation()
this.@NotNull public @NotNull org.bukkit.Location getMaximumLocation()
this.@NotNull public @NotNull List<org.bukkit.block.Block> blocks()
@NotNull public @NotNull List<org.bukkit.Location> locations()
public void set(@NotNull
@NotNull org.bukkit.Material material)
material - the material to set.@NotNull public @NotNull org.bukkit.Location centerBottom()
@NotNull public @NotNull org.bukkit.Location center()
public boolean isIn(@NotNull
@NotNull org.bukkit.Location location)
location - the location to check.true if the given location is in the cuboid.public void removeAll()
@NotNull public @NotNull List<org.bukkit.block.Block> randomBlocks(int limit, boolean duplicate)
limit - the limit to choose.duplicate - the duplicate to check if the block is already in the result list.@NotNull public @NotNull List<org.bukkit.Location> randomLocations(int limit, boolean duplicate)
limit - the limit to choose.duplicate - the duplicate to check if the location is already in the result list.Copyright © 2021. All rights reserved.