Package wtf.choco.alchema.cauldron
Class CauldronManager
java.lang.Object
wtf.choco.alchema.cauldron.CauldronManager
public final class CauldronManager
extends java.lang.Object
Manages instances of
AlchemicalCauldron
in any given world.- Author:
- Parker Hawke - Choco
-
Constructor Summary
Constructors Constructor Description CauldronManager()
-
Method Summary
Modifier and Type Method Description void
addCauldron(@NotNull AlchemicalCauldron cauldron)
Add anAlchemicalCauldron
to the world.void
clearCauldrons()
Clear all alchemical cauldrons from the world.@Nullable AlchemicalCauldron
getCauldron(@NotNull org.bukkit.block.Block block)
Get anAlchemicalCauldron
at the specifiedBlock
.@Nullable AlchemicalCauldron
getCauldron(@NotNull org.bukkit.Location location)
Get anAlchemicalCauldron
at the specifiedLocation
.@NotNull java.util.Collection<@NotNull AlchemicalCauldron>
getCauldrons()
Get an unmodifiable collection of allAlchemicalCauldron
s in this manager.void
removeCauldron(@NotNull AlchemicalCauldron cauldron)
Remove anAlchemicalCauldron
from the world.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CauldronManager
public CauldronManager()
-
-
Method Details
-
addCauldron
Add anAlchemicalCauldron
to the world.- Parameters:
cauldron
- the cauldron to add
-
removeCauldron
Remove anAlchemicalCauldron
from the world.- Parameters:
cauldron
- the cauldron to remove
-
getCauldron
@Nullable public @Nullable AlchemicalCauldron getCauldron(@NotNull @NotNull org.bukkit.block.Block block)Get anAlchemicalCauldron
at the specifiedBlock
. If no cauldron is present, null is returned.- Parameters:
block
- the block from which to get a cauldron- Returns:
- the alchemical cauldron at the block. null if none
-
getCauldron
@Nullable public @Nullable AlchemicalCauldron getCauldron(@NotNull @NotNull org.bukkit.Location location)Get anAlchemicalCauldron
at the specifiedLocation
. If no cauldron is present, null is returned.- Parameters:
location
- the location at which to get a cauldron- Returns:
- the alchemical cauldron at the location. null if none
-
getCauldrons
Get an unmodifiable collection of allAlchemicalCauldron
s in this manager.- Returns:
- all cauldrons
-
clearCauldrons
public void clearCauldrons()Clear all alchemical cauldrons from the world.
-