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

@@ -1,6 +1,9 @@
package org.bukkit.entity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* A wild tameable cat
*/
@@ -11,6 +14,7 @@ public interface Ocelot extends Animals, Tameable, Sittable {
*
* @return Type of the cat.
*/
@NotNull
public Type getCatType();
/**
@@ -18,7 +22,7 @@ public interface Ocelot extends Animals, Tameable, Sittable {
*
* @param type New type of this cat.
*/
public void setCatType(Type type);
public void setCatType(@NotNull Type type);
/**
* Represents the various different cat types there are.
@@ -61,6 +65,7 @@ public interface Ocelot extends Animals, Tameable, Sittable {
* @deprecated Magic value
*/
@Deprecated
@Nullable
public static Type getType(int id) {
return (id >= types.length) ? null : types[id];
}