mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 23:52:11 -07:00
SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public enum Particle {
|
||||
EXPLOSION_NORMAL,
|
||||
@@ -70,7 +71,7 @@ public enum Particle {
|
||||
dataType = Void.class;
|
||||
}
|
||||
|
||||
Particle(Class<?> data) {
|
||||
Particle(@NotNull Class<?> data) {
|
||||
dataType = data;
|
||||
}
|
||||
|
||||
@@ -78,6 +79,7 @@ public enum Particle {
|
||||
* Returns the required data type for the particle
|
||||
* @return the required data type
|
||||
*/
|
||||
@NotNull
|
||||
public Class<?> getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
@@ -91,7 +93,7 @@ public enum Particle {
|
||||
private final Color color;
|
||||
private final float size;
|
||||
|
||||
public DustOptions(Color color, float size) {
|
||||
public DustOptions(@NotNull Color color, float size) {
|
||||
Preconditions.checkArgument(color != null, "color");
|
||||
this.color = color;
|
||||
this.size = size;
|
||||
@@ -102,6 +104,7 @@ public enum Particle {
|
||||
*
|
||||
* @return particle color
|
||||
*/
|
||||
@NotNull
|
||||
public Color getColor() {
|
||||
return color;
|
||||
}
|
||||
|
Reference in New Issue
Block a user