aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0006-Adventure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0006-Adventure.patch')
-rw-r--r--patches/api/0006-Adventure.patch72
1 files changed, 62 insertions, 10 deletions
diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch
index 6e3f2c5ebd..3bf28e3242 100644
--- a/patches/api/0006-Adventure.patch
+++ b/patches/api/0006-Adventure.patch
@@ -8,7 +8,7 @@ Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: Yannick Lamprecht <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index b3df8cf8d32a4cc99a3a3950f146cdab65826e1b..9011451c6a60db08dcc255a84470f8ce92f7b2a4 100644
+index f605e7e0f812a2297b1cecf3f37b69a8edc6b4a5..e3748b4b39529fde27e5bb00597a56becdf0843c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,12 +11,28 @@ java {
@@ -1493,7 +1493,7 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 6ca5f7a85087ca1c7e5e2d940bd3c65b84d2d356..0f902aec66ec550f80709f7f314ca90d374ebb53 100644
+index ef3c0410ba4f88ec8b51e79abdc97777fdc00d31..913cf8308840ca1f365eb1f456f64b96046ed060 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable;
@@ -1525,7 +1525,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
return warning == null || warning.value();
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
-index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddecefbd863e 100644
+index 28193b8e3c79e14af2ce47857a717f9dd4f1fa42..b53f24c0368ff4e4f5287f1699643a0c00579031 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
@@ -1537,7 +1537,7 @@ index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddec
/**
* Gets the {@link Block} at the given coordinates
-@@ -608,6 +608,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
+@@ -617,6 +617,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public List<Player> getPlayers();
@@ -2180,10 +2180,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f
public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index c349cd16de02981392a8788ddaa3152e901aacff..6a915b5b41daa5ea64913a2d5c611a6167168395 100644
+index a456e43308b95f51beed2159e6baf00f32702a71..350d52f4dd97a7e6a6a9a967e1c6a8781feda22e 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -295,6 +295,19 @@ public abstract class Enchantment implements Keyed {
+@@ -296,6 +296,19 @@ public abstract class Enchantment implements Keyed, Translatable {
* @return True if the enchantment may be applied, otherwise False
*/
public abstract boolean canEnchantItem(@NotNull ItemStack item);
@@ -4356,7 +4356,7 @@ index 88cdce67e6a55712cb56e946f2f09c82ddbc1d15..e76c847e57f3d32757129d56922862a4
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
-index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401958fb227 100644
+index fc94719f702f23da8de5340d7f9e9b9d0c9d7c66..86c9e4229a1936c5893016e5b8087aa9fd06ddab 100644
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
@@ -4510,7 +4510,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
/**
@@ -157,7 +266,9 @@ public interface BookMeta extends ItemMeta {
- * pages. Maximum 100 pages with 256 characters per page.
+ * pages. Maximum 100 pages with 1024 characters per page.
*
* @param pages A list of pages to set the book to use
+ * @deprecated in favour of {@link #pages(List)}
@@ -4520,7 +4520,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
/**
@@ -165,7 +276,9 @@ public interface BookMeta extends ItemMeta {
- * pages. Maximum 50 pages with 256 characters per page.
+ * pages. Maximum 100 pages with 1024 characters per page.
*
* @param pages A list of strings, each being a page
+ * @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)}
@@ -4530,7 +4530,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
/**
@@ -173,7 +286,9 @@ public interface BookMeta extends ItemMeta {
- * 256 characters per page.
+ * 1024 characters per page.
*
* @param pages A list of strings, each being a page
+ * @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)}
@@ -4695,6 +4695,58 @@ index 9f159ac909ad5287b719cee331db5c44654ec547..f1fcc844d563a0108230676dec84ef25
void setLore(@Nullable List<String> lore);
/**
+diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab572cf54548 100644
+--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
++++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+@@ -51,4 +51,21 @@ public interface TrimMaterial extends Keyed, Translatable {
+ * {@link Material#AMETHYST_SHARD}.
+ */
+ public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst"));
++
++ // Paper start - adventure
++ /**
++ * Get the description of this {@link TrimMaterial}.
++ *
++ * @return the description
++ */
++ [email protected] Component description();
++
++ /**
++ * @deprecated this method assumes that {@link #description()} will
++ * always be a translatable component which is not guaranteed.
++ */
++ @Override
++ @Deprecated(forRemoval = true)
++ @org.jetbrains.annotations.NotNull String getTranslationKey();
++ // Paper end - adventure
+ }
+diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+index ccf02c79e2784de75273f5ad7f83ce5c33a688fe..3fa087d09c7c2d864eea25659951a537359c9589 100644
+--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
++++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+@@ -75,4 +75,21 @@ public interface TrimPattern extends Keyed, Translatable {
+ * {@link Material#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}.
+ */
+ public static final TrimPattern HOST = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("host"));
++
++ // Paper start - adventure
++ /**
++ * Get the description of this {@link TrimPattern}.
++ *
++ * @return the description
++ */
++ [email protected] Component description();
++
++ /**
++ * @deprecated this method assumes that {@link #description()} will
++ * always be a translatable component which is not guaranteed.
++ */
++ @Override
++ @Deprecated(forRemoval = true)
++ @org.jetbrains.annotations.NotNull String getTranslationKey();
++ // Paper end - adventure
+ }
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index b90fd819a781d3a2117ffa25f0864b1576901f9f..7d4f4970dae6fe4eeea6b6b6810dcecfe20d6e51 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java