aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0166-Fix-Spigot-annotation-mistakes.patch')
-rw-r--r--patches/api/0166-Fix-Spigot-annotation-mistakes.patch40
1 files changed, 20 insertions, 20 deletions
diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
index 47e2270732..7797491404 100644
--- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
+++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
@@ -269,7 +269,7 @@ index f9c9ae463aacd593e3aa9caf037ea1e23d56c780..38ccfd0a1b38e7a87185e668d3c02081
/**
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
-index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f49a257d01 100644
+index b02efba048be00e42502111fcdd2297529926666..fb4b6f0e908ffa50c3b2f8d04d9f3810898b8d5e 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -46,7 +46,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
@@ -300,10 +300,10 @@ index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f4
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb30495e647 100644
+index 28f2192f8a2748dfc631ce4b33599e23e6e68c62..bddfc295bb1247097cb5fdae6e13585a45c18e1c 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -4683,20 +4683,20 @@ public enum Material implements Keyed, Translatable {
+@@ -4702,20 +4702,20 @@ public enum Material implements Keyed, Translatable {
* Do not use for any reason.
*
* @return ID of this material
@@ -328,7 +328,7 @@ index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb3
public boolean isLegacy() {
return legacy;
}
-@@ -4772,8 +4772,10 @@ public enum Material implements Keyed, Translatable {
+@@ -4791,8 +4791,10 @@ public enum Material implements Keyed, Translatable {
* Gets the MaterialData class associated with this Material
*
* @return MaterialData associated with this Material
@@ -339,7 +339,7 @@ index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb3
public Class<? extends MaterialData> getData() {
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
-@@ -5229,7 +5231,11 @@ public enum Material implements Keyed, Translatable {
+@@ -5248,7 +5250,11 @@ public enum Material implements Keyed, Translatable {
* material.
*
* @return true if this material can be interacted with.
@@ -453,25 +453,25 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
return note;
}
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index 883338632b81f6eebc03c95d5883536a5d87fc59..fbede496b05c4b9b1ecd12e711a100586776d469 100644
+index 30ba3daba730c2994b589cc321d66b503da2fe8b..4e67b944351ec3743e5eeaba3f5de99e0df15154 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -228,14 +228,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -248,14 +248,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see TrimMaterial
*/
- @ApiStatus.Experimental
- Registry<TrimMaterial> TRIM_MATERIAL = Bukkit.getRegistry(TrimMaterial.class);
+ Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(Bukkit.getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug.");
/**
* Trim patterns.
*
* @see TrimPattern
*/
- @ApiStatus.Experimental
- Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
+ Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(Bukkit.getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug.");
/**
* Damage types.
-@@ -343,8 +341,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -385,8 +383,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @param input non-null input
* @return registered object or null if does not exist
@@ -715,10 +715,10 @@ index 3e07fc1bc0e08d0cfd998711c7fd547b2b7b6b73..f4a739d8022d19a7ae0ee9bf93eb5c48
/**
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
-index dfd8187ef941e8afe9cb28a26bf0d2cf2e4c4bc5..d285a1df492d2155f179e8abc17d0bf7527e6d38 100644
+index 6c745f4db620870d7e74ead2e846df34832a9e8e..eb6b330763931b55d73537153dbdb5cc96d3e94f 100644
--- a/src/main/java/org/bukkit/block/BlockType.java
+++ b/src/main/java/org/bukkit/block/BlockType.java
-@@ -3433,9 +3433,14 @@ public interface BlockType extends Keyed, Translatable {
+@@ -3437,9 +3437,14 @@ public interface BlockType extends Keyed, Translatable {
* state as well. This method will return true if there is at least one
* state in which additional interact handling is performed for the
* block type.
@@ -787,10 +787,10 @@ index a7c4e4baf14dd64e454028002c1c5d4f83ec1659..53c61cfa4c2cdc3adfe1c5b43fb15eeb
public interface SuspiciousSand extends BrushableBlock {
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index c7a901707048e9dc82b8f17f3285727460173c72..64675a3641acb50676ca0122f8473ce94de8fba7 100644
+index 378ef178bdcf0d71b5d80fc5028ce738437f9391..25985a3872ac142c0a3b2fb2dc5387ecdd3ff5b3 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -269,7 +269,7 @@ public abstract class Enchantment implements Keyed, Translatable {
+@@ -263,7 +263,7 @@ public abstract class Enchantment implements Keyed, Translatable {
* @deprecated enchantment groupings are now managed by tags, not categories
*/
@NotNull
@@ -1875,7 +1875,7 @@ index edef478786bb7456af29ca960009873095830050..e8ac449e6280827beb6d2699df75b1d5
/**
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
-index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0eed73307 100644
+index 871adbf2f9015dffac9edc3ce35aa6acd3b75526..0899981b9ab1f98dacc617156d12779421e4c275 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -163,9 +163,9 @@ public final class MapCursor {
@@ -1902,7 +1902,7 @@ index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0
public void setRawType(byte type) {
Type enumType = Type.byValue(type);
Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type);
-@@ -336,9 +336,9 @@ public final class MapCursor {
+@@ -332,9 +332,9 @@ public final class MapCursor {
* Gets the internal value of the cursor.
*
* @return the value
@@ -1914,7 +1914,7 @@ index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0
byte getValue();
/**
-@@ -346,9 +346,9 @@ public final class MapCursor {
+@@ -342,9 +342,9 @@ public final class MapCursor {
*
* @param value the value
* @return the matching type
@@ -2836,10 +2836,10 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac
/**
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
-index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5b609ab86 100644
+index bd9ea2fe16b81f5ef5e83427e49c898db69cd4dc..e2d1d26b9debbe1ef852f0260180200a916a7db7 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
-@@ -279,9 +279,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
+@@ -278,9 +278,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
* Returns the unique ID of this type.
*
* @return Unique ID
@@ -2851,7 +2851,7 @@ index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5
public abstract int getId();
/**
-@@ -317,9 +317,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
+@@ -316,9 +316,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
*
* @param id Unique ID to fetch
* @return Resulting type, or null if not found.