|
|
|
@ -1,7 +1,7 @@
|
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sun, 24 Mar 2019 18:39:01 -0400
|
|
|
|
Date: Sun, 24 Mar 2019 18:39:01 -0400
|
|
|
|
Subject: [PATCH] Flip some Spigot API null annotations
|
|
|
|
Subject: [PATCH] Fix Spigot annotation mistakes
|
|
|
|
|
|
|
|
|
|
|
|
while some of these may of been true, they are extreme cases and cause
|
|
|
|
while some of these may of been true, they are extreme cases and cause
|
|
|
|
a ton of noise to plugin developers.
|
|
|
|
a ton of noise to plugin developers.
|
|
|
|
@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|
|
|
* @param pitch The absolute rotation on the y-plane, in degrees
|
|
|
|
* @param pitch The absolute rotation on the y-plane, in degrees
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
- public Location(@Nullable final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
|
|
|
|
- public Location(@Nullable final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
|
|
|
|
+ public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
|
|
|
|
+ public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) { // Paper
|
|
|
|
if (world != null) {
|
|
|
|
if (world != null) {
|
|
|
|
this.world = new WeakReference<>(world);
|
|
|
|
this.world = new WeakReference<>(world);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|
|
|
* @see #isWorldLoaded()
|
|
|
|
* @see #isWorldLoaded()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
- @Nullable
|
|
|
|
- @Nullable
|
|
|
|
+ @UndefinedNullability
|
|
|
|
+ @UndefinedNullability // Paper
|
|
|
|
public World getWorld() {
|
|
|
|
public World getWorld() {
|
|
|
|
if (this.world == null) {
|
|
|
|
if (this.world == null) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
@ -79,10 +79,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|
|
|
* @return the tag or null
|
|
|
|
* @return the tag or null
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
- @Nullable
|
|
|
|
- @Nullable
|
|
|
|
+ @UndefinedNullability
|
|
|
|
+ @UndefinedNullability // Paper
|
|
|
|
<T extends Keyed> Tag<T> getTag(@NotNull String registry, @NotNull NamespacedKey tag, @NotNull Class<T> clazz);
|
|
|
|
<T extends Keyed> Tag<T> getTag(@NotNull String registry, @NotNull NamespacedKey tag, @NotNull Class<T> clazz);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/LingeringPotion.java b/src/main/java/org/bukkit/entity/LingeringPotion.java
|
|
|
|
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/org/bukkit/entity/LingeringPotion.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/LingeringPotion.java
|
|
|
|
|
|
|
|
@@ -0,0 +0,0 @@ package org.bukkit.entity;
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @deprecated lingering status depends on only on the potion item.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
+@Deprecated // Paper
|
|
|
|
|
|
|
|
public interface LingeringPotion extends ThrownPotion { }
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
|
|
|
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
|
|
|
|
|
|
|
@@ -0,0 +0,0 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
|
|
|
|
|
|
|
* @return experience level costs offered
|
|
|
|
|
|
|
|
* @deprecated Use {@link #getOffers()} instead of this method
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
+ @Deprecated // Paper
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
|
|
|
|
public int[] getExpLevelCostsOffered() {
|
|
|
|
|
|
|
|
int[] levelOffers = new int[offers.length];
|
|
|
|
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
|
|
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
|
|
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
|
|
@ -116,6 +138,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|
|
|
import org.bukkit.Utility;
|
|
|
|
import org.bukkit.Utility;
|
|
|
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
|
|
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
|
|
|
import org.bukkit.enchantments.Enchantment;
|
|
|
|
import org.bukkit.enchantments.Enchantment;
|
|
|
|
|
|
|
|
@@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
|
|
|
|
|
|
|
* @param damage durability / damage
|
|
|
|
|
|
|
|
* @deprecated see {@link #setDurability(short)}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
+ @Deprecated // Paper
|
|
|
|
|
|
|
|
public ItemStack(@NotNull final Material type, final int amount, final short damage) {
|
|
|
|
|
|
|
|
this(type, amount, damage, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
|
|
|
@@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return a copy of the current ItemStack's ItemData
|
|
|
|
* @return a copy of the current ItemStack's ItemData
|
|
|
|
@ -125,3 +155,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|
|
|
public ItemMeta getItemMeta() {
|
|
|
|
public ItemMeta getItemMeta() {
|
|
|
|
return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone();
|
|
|
|
return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/material/Step.java b/src/main/java/org/bukkit/material/Step.java
|
|
|
|
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
|
|
|
|
--- a/src/main/java/org/bukkit/material/Step.java
|
|
|
|
|
|
|
|
+++ b/src/main/java/org/bukkit/material/Step.java
|
|
|
|
|
|
|
|
@@ -0,0 +0,0 @@ public class Step extends TexturedMaterial {
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @deprecated Magic value
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
+ @Deprecated // Paper
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
protected int getTextureIndex() {
|
|
|
|
|
|
|
|
return getData() & 0x7;
|