Fix api compile

This commit is contained in:
Jason Penilla 2024-04-23 14:47:29 -07:00
parent f2350fe0d1
commit 5cfd92b240
No known key found for this signature in database
GPG Key ID: 0E75A301420E48F8
3 changed files with 8 additions and 12 deletions

View File

@ -10,7 +10,7 @@ This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
new file mode 100644
index 0000000000000000000000000000000000000000..507343f971fd42eada8ce3346b025daa9aadb7a2
index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b529629192cea6900
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
@@ -0,0 +1,579 @@
@ -473,7 +473,7 @@ index 0000000000000000000000000000000000000000..507343f971fd42eada8ce3346b025daa
+ */
+ @NotNull
+ public ParticleBuilder color(@Nullable Color color, float size) {
+ if (particle != Particle.REDSTONE && color != null) {
+ if (particle != Particle.DUST && color != null) {
+ throw new IllegalStateException("Color may only be set on REDSTONE");
+ }
+

View File

@ -1580,7 +1580,7 @@ index 597a18a767b68b47e81454b7d44613c7178c1366..bc3440eb72127824b3961fbdae583bb6
public ItemStack getInput() {
return this.ingredient.getItemStack();
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index de38d9b667e04852c7bdccfa17cbabb1512f4c19..348ad8932fc55830f83ccc60d5cc4aaf8a29d164 100644
index de38d9b667e04852c7bdccfa17cbabb1512f4c19..e1edd463b522a0f610b82917654b7d87ffc3de22 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -111,6 +111,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@ -1591,7 +1591,7 @@ index de38d9b667e04852c7bdccfa17cbabb1512f4c19..348ad8932fc55830f83ccc60d5cc4aaf
* @return true if this has a localized name
* @deprecated meta no longer exists
*/
@@ -123,9 +124,11 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@@ -123,6 +124,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
* Plugins should check that hasLocalizedName() returns <code>true</code>
* before calling this method.
*
@ -1599,11 +1599,7 @@ index de38d9b667e04852c7bdccfa17cbabb1512f4c19..348ad8932fc55830f83ccc60d5cc4aaf
* @return the localized name that is set
* @deprecated meta no longer exists
*/
+ @Deprecated // Paper - Deprecate old localized API
@NotNull
@Deprecated(forRemoval = true)
String getLocalizedName();
@@ -133,6 +136,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@@ -133,6 +135,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
/**
* Sets the localized name.
*

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index 348ad8932fc55830f83ccc60d5cc4aaf8a29d164..b039fc170c0760f15fa0f9220da2032a23e5c455 100644
index e1edd463b522a0f610b82917654b7d87ffc3de22..c20d39f0f88e6059803ef44b8460f2de67c5e8a9 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -5,6 +5,7 @@ import java.util.Collection;
@ -54,7 +54,7 @@ index 348ad8932fc55830f83ccc60d5cc4aaf8a29d164..b039fc170c0760f15fa0f9220da2032a
/**
* Checks for existence of an item name.
* <br>
@@ -181,6 +206,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@@ -180,6 +205,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@Nullable
List<String> getLore();
@ -74,7 +74,7 @@ index 348ad8932fc55830f83ccc60d5cc4aaf8a29d164..b039fc170c0760f15fa0f9220da2032a
/**
* Sets the lore for this item.
* Removes lore when given null.
@@ -191,6 +229,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@@ -190,6 +228,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@Deprecated // Paper
void setLore(@Nullable List<String> lore);