SPIGOT-2540: Add nullability annotations to entire Bukkit API

By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
Bukkit/Spigot
2019-03-13 17:42:57 +11:00
parent e069a80fd8
commit 416c865476
565 changed files with 5372 additions and 2008 deletions

View File

@@ -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);
}