SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
@@ -2,6 +2,8 @@ package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents an Enderman.
|
||||
@@ -13,6 +15,7 @@ public interface Enderman extends Monster {
|
||||
*
|
||||
* @return MaterialData containing the id and data of the block
|
||||
*/
|
||||
@NotNull
|
||||
public MaterialData getCarriedMaterial();
|
||||
|
||||
/**
|
||||
@@ -20,13 +23,14 @@ public interface Enderman extends Monster {
|
||||
*
|
||||
* @param material data to set the carried block to
|
||||
*/
|
||||
public void setCarriedMaterial(MaterialData material);
|
||||
public void setCarriedMaterial(@NotNull MaterialData material);
|
||||
|
||||
/**
|
||||
* Gets the data of the block that the Enderman is carrying.
|
||||
*
|
||||
* @return BlockData containing the carried block, or null if none
|
||||
*/
|
||||
@Nullable
|
||||
public BlockData getCarriedBlock();
|
||||
|
||||
/**
|
||||
@@ -34,5 +38,5 @@ public interface Enderman extends Monster {
|
||||
*
|
||||
* @param blockData data to set the carried block to, or null to remove
|
||||
*/
|
||||
public void setCarriedBlock(BlockData blockData);
|
||||
public void setCarriedBlock(@Nullable BlockData blockData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user