Files
Stargate/src/main/java/net/knarcraft/stargate/container/BlockChangeRequest.java
EpicKnarvik97 b4a6ce1a77 Adds nullability annotations among other things
Adds nullability annotations for all methods
Fixes some nullability problems and inconsistencies
Gets rid of RelativeBlockVector's inner class
Changes RelativeBlockVector to a record
Simplifies FromTheEndTeleportation's storage, and makes it into a minimal record
Removes the putStringInList method
Gets rid of some primitive list usage
Fixes some incorrect method accessibility
Removes some redundancy in PortalOption
2024-02-20 12:43:01 +01:00

61 lines
1.5 KiB
Java

package net.knarcraft.stargate.container;
import org.bukkit.Axis;
import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a request for changing a block into another material
*/
public class BlockChangeRequest {
private final BlockLocation blockLocation;
private final Material newMaterial;
private final Axis newAxis;
/**
* Instantiates a new block change request
*
* @param blockLocation <p>The location of the block to change</p>
* @param material <p>The new material to change the block to</p>
* @param axis <p>The new axis to orient the block along</p>
*/
public BlockChangeRequest(@NotNull BlockLocation blockLocation, @NotNull Material material, @Nullable Axis axis) {
this.blockLocation = blockLocation;
newMaterial = material;
newAxis = axis;
}
/**
* Gets the location of the block to change
*
* @return <p>The location of the block</p>
*/
@NotNull
public BlockLocation getBlockLocation() {
return blockLocation;
}
/**
* Gets the material to change the block into
*
* @return <p>The material to change the block into</p>
*/
@NotNull
public Material getMaterial() {
return newMaterial;
}
/**
* Gets the axis to orient the block along
*
* @return <p>The axis to orient the block along</p>
*/
@Nullable
public Axis getAxis() {
return newAxis;
}
}