Stargate/src/main/java/net/knarcraft/stargate/BloxPopulator.java

87 lines
2.1 KiB
Java
Raw Normal View History

package net.knarcraft.stargate;
import org.bukkit.Axis;
import org.bukkit.Material;
2021-02-08 00:32:20 +01:00
/**
* Used to store information about a custom block populator
*/
public class BloxPopulator {
private BlockLocation blockLocation;
private Material nextMat;
private Axis nextAxis;
2021-02-08 00:32:20 +01:00
/**
* Instantiates a new block populator
* @param blockLocation <p>The location to start from</p>
* @param material <p>The material to populate</p>
*/
public BloxPopulator(BlockLocation blockLocation, Material material) {
this.blockLocation = blockLocation;
nextMat = material;
nextAxis = null;
}
2021-02-08 00:32:20 +01:00
/**
* Instantiates a new block populator
* @param blockLocation <p>The location to start from</p>
* @param material <p>The material to populate</p>
* @param axis <p>The axis to populate along</p>
*/
public BloxPopulator(BlockLocation blockLocation, Material material, Axis axis) {
this.blockLocation = blockLocation;
nextMat = material;
nextAxis = axis;
}
2021-02-08 00:32:20 +01:00
/**
* Sets the location to start from
* @param blockLocation <p>The new start location</p>
*/
public void setBlockLocation(BlockLocation blockLocation) {
this.blockLocation = blockLocation;
}
2021-02-08 00:32:20 +01:00
/**
* Sets the polulator material
* @param material <p>The new populator material</p>
*/
public void setMat(Material material) {
nextMat = material;
}
2021-02-08 00:32:20 +01:00
/**
* Sets the populator axis
* @param axis <p>The new populator axis</p>
*/
public void setAxis(Axis axis) {
nextAxis = axis;
}
2021-02-08 00:32:20 +01:00
/**
* Gets the location to start from
* @return <p>The location to start from</p>
*/
public BlockLocation getBlockLocation() {
return blockLocation;
}
2021-02-08 00:32:20 +01:00
/**
* Gets the material used for population
* @return <p>The material used for population</p>
*/
public Material getMat() {
return nextMat;
}
2021-02-08 00:32:20 +01:00
/**
* Gets the current population axis
* @return <p>The current population axis</p>
*/
public Axis getAxis() {
return nextAxis;
}
}