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,7 @@ package org.bukkit.block;
import org.bukkit.DyeColor;
import org.bukkit.block.banner.Pattern;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@@ -15,6 +16,7 @@ public interface Banner extends BlockState {
*
* @return the base color
*/
@NotNull
DyeColor getBaseColor();
/**
@@ -24,13 +26,14 @@ public interface Banner extends BlockState {
*
* @param color the base color
*/
void setBaseColor(DyeColor color);
void setBaseColor(@NotNull DyeColor color);
/**
* Returns a list of patterns on this banner
*
* @return the patterns
*/
@NotNull
List<Pattern> getPatterns();
/**
@@ -38,7 +41,7 @@ public interface Banner extends BlockState {
*
* @param patterns the new list of patterns
*/
void setPatterns(List<Pattern> patterns);
void setPatterns(@NotNull List<Pattern> patterns);
/**
* Adds a new pattern on top of the existing
@@ -46,7 +49,7 @@ public interface Banner extends BlockState {
*
* @param pattern the new pattern to add
*/
void addPattern(Pattern pattern);
void addPattern(@NotNull Pattern pattern);
/**
* Returns the pattern at the specified index
@@ -54,6 +57,7 @@ public interface Banner extends BlockState {
* @param i the index
* @return the pattern
*/
@NotNull
Pattern getPattern(int i);
/**
@@ -62,6 +66,7 @@ public interface Banner extends BlockState {
* @param i the index
* @return the removed pattern
*/
@NotNull
Pattern removePattern(int i);
/**
@@ -70,7 +75,7 @@ public interface Banner extends BlockState {
* @param i the index
* @param pattern the new pattern
*/
void setPattern(int i, Pattern pattern);
void setPattern(int i, @NotNull Pattern pattern);
/**
* Returns the number of patterns on this