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.block;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a jukebox.
|
||||
@@ -13,6 +15,7 @@ public interface Jukebox extends BlockState {
|
||||
*
|
||||
* @return The record Material, or AIR if none is inserted
|
||||
*/
|
||||
@NotNull
|
||||
public Material getPlaying();
|
||||
|
||||
/**
|
||||
@@ -20,13 +23,14 @@ public interface Jukebox extends BlockState {
|
||||
*
|
||||
* @param record The record Material, or null/AIR to stop playing
|
||||
*/
|
||||
public void setPlaying(Material record);
|
||||
public void setPlaying(@Nullable Material record);
|
||||
|
||||
/**
|
||||
* Gets the record item inserted into the jukebox.
|
||||
*
|
||||
* @return a copy of the inserted record, or an air stack if none
|
||||
*/
|
||||
@NotNull
|
||||
public ItemStack getRecord();
|
||||
|
||||
/**
|
||||
@@ -34,7 +38,7 @@ public interface Jukebox extends BlockState {
|
||||
*
|
||||
* @param record the record to insert or null/AIR to empty
|
||||
*/
|
||||
public void setRecord(ItemStack record);
|
||||
public void setRecord(@Nullable ItemStack record);
|
||||
|
||||
/**
|
||||
* Checks if the jukebox is playing a record.
|
||||
|
||||
Reference in New Issue
Block a user