Updated Upstream (Bukkit/CraftBukkit) (#10691)
Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: fa99e752 PR-1007: Add ItemMeta#getAsComponentString() 94a91782 Fix copy-pasted BlockType.Typed documentation 9b34ac8c Largely restore deprecated PotionData API 51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5 702d15fe Fix Javadoc reference 42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them 237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent 035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it 8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more 87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent CraftBukkit Changes: 4af0f22e8 SPIGOT-7664: Item meta should prevail over block states c2ccc46ec SPIGOT-7666: Fix access to llama and horse special slot 124ac66d7 SPIGOT-7665: Fix ThrownPotion#getEffects() implementation only bringing custom effects 66f1f439a Restore null page behaviour of signed books even though not strictly allowed by API 6118e5398 Fix regression listening to minecraft:brand custom payloads c1a26b366 Fix unnecessary and potential not thread-safe chat visibility check 12360a7ec Remove unused imports 147b098b4 PR-1397: Add ItemMeta#getAsComponentString() 428aefe0e Largely restore deprecated PotionData API afe5b5ee9 PR-1275: Add internal ItemType and BlockType, delegate Material methods to them 8afeafa7d SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent 4e7d749d4 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it 441880757 Support both entity_data and bucket_entity_data on axolotl/fish buckets 0e22fdd1e Fix custom direct BlockState being not correctly set in DamageSource f2182ed47 SPIGOT-7659: TropicalFishBucketMeta should use BUCKET_ENTITY_DATA 2a6207fe1 PR-1393: Improve field rename handling and centralize conversion between bukkit and string more c024a5039 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent 741b84480 PR-1390: Improve internal handling of damage sources 0364df4e1 SPIGOT-7657: Error when loading angry entities
Dieser Commit ist enthalten in:
Ursprung
b98d20a8ac
Commit
ac554ad46d
@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef67c3acf2c
|
||||
index 0000000000000000000000000000000000000000..7b79bf33074355020e0b3b5ef40c7f2e6ba644b4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
@@ -0,0 +1,128 @@
|
||||
@@ -0,0 +1,141 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import net.kyori.adventure.key.Keyed;
|
||||
@ -100,6 +100,7 @@ index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef6
|
||||
+import org.bukkit.Sound;
|
||||
+import org.bukkit.attribute.Attribute;
|
||||
+import org.bukkit.block.Biome;
|
||||
+import org.bukkit.block.BlockType;
|
||||
+import org.bukkit.block.banner.PatternType;
|
||||
+import org.bukkit.damage.DamageType;
|
||||
+import org.bukkit.enchantments.Enchantment;
|
||||
@ -111,11 +112,13 @@ index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef6
|
||||
+import org.bukkit.entity.memory.MemoryKey;
|
||||
+import org.bukkit.generator.structure.Structure;
|
||||
+import org.bukkit.generator.structure.StructureType;
|
||||
+import org.bukkit.inventory.ItemType;
|
||||
+import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
+import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
+import org.bukkit.map.MapCursor;
|
||||
+import org.bukkit.potion.PotionEffectType;
|
||||
+import org.bukkit.potion.PotionType;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+
|
||||
+import static io.papermc.paper.registry.RegistryKeyImpl.create;
|
||||
+
|
||||
@ -162,6 +165,16 @@ index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef6
|
||||
+ * @see io.papermc.paper.registry.keys.MobEffectKeys
|
||||
+ */
|
||||
+ RegistryKey<PotionEffectType> MOB_EFFECT = create("mob_effect");
|
||||
+ /**
|
||||
+ * @apiNote DO NOT USE
|
||||
+ */
|
||||
+ @ApiStatus.Internal
|
||||
+ RegistryKey<BlockType> BLOCK = create("block");
|
||||
+ /**
|
||||
+ * @apiNote DO NOT USE
|
||||
+ */
|
||||
+ @ApiStatus.Internal
|
||||
+ RegistryKey<ItemType> ITEM = create("item");
|
||||
+
|
||||
+
|
||||
+ /* ********************** *
|
||||
|
@ -1491,7 +1491,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 ef3c0410ba4f88ec8b51e79abdc97777fdc00d31..913cf8308840ca1f365eb1f456f64b96046ed060 100644
|
||||
index ce9bb54a6ef8a7d31804ec63aa1f6cbbd6ae2d54..baf49da3dd46039da2f24a4af8b1b8617bb25501 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;
|
||||
@ -3170,10 +3170,10 @@ index f4ac033ff8794a61c82a49dc6c3f863f3291455d..d944d67f544494355f03c5bc9afd8ea7
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9ed1a7d2d 100644
|
||||
index 133760be6c73436512ba684a3ac77a514b2d8765..9473303bd8ab1f6b63b6999a5f5ff3eca1cc23d6 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
@@ -11,26 +11,49 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -12,26 +12,49 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
private int newExp = 0;
|
||||
@ -3185,18 +3185,18 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9
|
||||
private boolean keepInventory = false;
|
||||
+ // Paper start - adventure
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List<ItemStack> drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ this(player, drops, droppedExp, 0, deathMessage);
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ this(player, damageSource, drops, droppedExp, 0, deathMessage);
|
||||
+ }
|
||||
+
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ this(player, drops, droppedExp, newExp, 0, 0, deathMessage);
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ this(player, damageSource, drops, droppedExp, newExp, 0, 0, deathMessage);
|
||||
+ }
|
||||
+
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ super(player, drops, droppedExp);
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ super(player, damageSource, drops, droppedExp);
|
||||
+ this.newExp = newExp;
|
||||
+ this.newTotalExp = newTotalExp;
|
||||
+ this.newLevel = newLevel;
|
||||
@ -3205,18 +3205,18 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9
|
||||
+ // Paper end - adventure
|
||||
|
||||
+ @Deprecated // Paper
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull final List<ItemStack> drops, final int droppedExp, @Nullable final String deathMessage) {
|
||||
this(player, drops, droppedExp, 0, deathMessage);
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, @Nullable final String deathMessage) {
|
||||
this(player, damageSource, drops, droppedExp, 0, deathMessage);
|
||||
}
|
||||
|
||||
+ @Deprecated // Paper
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, @Nullable final String deathMessage) {
|
||||
this(player, drops, droppedExp, newExp, 0, 0, deathMessage);
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, @Nullable final String deathMessage) {
|
||||
this(player, damageSource, drops, droppedExp, newExp, 0, 0, deathMessage);
|
||||
}
|
||||
|
||||
+ @Deprecated // Paper
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) {
|
||||
super(player, drops, droppedExp);
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) {
|
||||
super(player, damageSource, drops, droppedExp);
|
||||
this.newExp = newExp;
|
||||
this.newTotalExp = newTotalExp;
|
||||
this.newLevel = newLevel;
|
||||
@ -3225,7 +3225,7 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -39,25 +62,49 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -40,25 +63,49 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
return (Player) entity;
|
||||
}
|
||||
|
||||
@ -4294,7 +4294,7 @@ index e12996492c1558fed9fab30de9f8018e0ed7fac3..002acfbdce1db10f7ba1b6a013e678f5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 60ebfab9596f26cfd2d75a43f3f88f2dd56575f3..dbaf54018a7dd392378869a5a302a880c7a56338 100644
|
||||
index b8bb11544bdfb5b9272c2c3c33c95a4c1c7fdf12..86fbc3902989a3baca851ab8c3866af445451787 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -215,4 +215,24 @@ public interface ItemFactory {
|
||||
@ -4323,10 +4323,10 @@ index 60ebfab9596f26cfd2d75a43f3f88f2dd56575f3..dbaf54018a7dd392378869a5a302a880
|
||||
+ // Paper end - Adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 257b5db1aa58d57cfbf5bd1f17f9df6c509bef90..53cc84d1ef6e281e8637ec7406236e1185ad7d82 100644
|
||||
index 692f67c4e27cf62451130479510d06c89274ad23..22e883c8d737cf9f799c6160ff63d90f99250020 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* use this class to encapsulate Materials for which {@link Material#isItem()}
|
||||
* returns false.</b>
|
||||
*/
|
||||
@ -4335,7 +4335,7 @@ index 257b5db1aa58d57cfbf5bd1f17f9df6c509bef90..53cc84d1ef6e281e8637ec7406236e11
|
||||
private Material type = Material.AIR;
|
||||
private int amount = 0;
|
||||
private MaterialData data = null;
|
||||
@@ -617,4 +617,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -624,4 +624,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public String getTranslationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
@ -4596,10 +4596,10 @@ index 9bab73c3c2ca759b8e1c7d07d98cc593c961666a..f0c6943da3f783101ca647b75b3230fa
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aeebb9a6fd6 100644
|
||||
index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb79b4431b 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -34,6 +34,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -35,6 +35,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasDisplayName();
|
||||
|
||||
@ -4624,7 +4624,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
/**
|
||||
* Gets the display name that is set.
|
||||
* <p>
|
||||
@@ -41,7 +59,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -42,7 +60,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* before calling this method.
|
||||
*
|
||||
* @return the display name that is set
|
||||
@ -4634,7 +4634,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
@NotNull
|
||||
String getDisplayName();
|
||||
|
||||
@@ -49,7 +69,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -50,7 +70,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Sets the display name.
|
||||
*
|
||||
* @param name the name to set
|
||||
@ -4644,7 +4644,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
void setDisplayName(@Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -62,6 +84,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -63,6 +85,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasItemName();
|
||||
|
||||
@ -4677,7 +4677,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
/**
|
||||
* Gets the item name that is set.
|
||||
* <br>
|
||||
@@ -72,7 +120,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -73,7 +121,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* calling this method.
|
||||
*
|
||||
* @return the item name that is set
|
||||
@ -4687,7 +4687,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
@NotNull
|
||||
String getItemName();
|
||||
|
||||
@@ -83,7 +133,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -84,7 +134,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* anvil, is not styled with italics, and does not show labels.
|
||||
*
|
||||
* @param name the name to set
|
||||
@ -4697,7 +4697,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
void setItemName(@Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -124,6 +176,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -125,6 +177,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasLore();
|
||||
|
||||
@ -4722,7 +4722,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
/**
|
||||
* Gets the lore that is set.
|
||||
* <p>
|
||||
@@ -131,7 +201,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -132,7 +202,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* calling this method.
|
||||
*
|
||||
* @return a list of lore that is set
|
||||
@ -4732,7 +4732,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee
|
||||
@Nullable
|
||||
List<String> getLore();
|
||||
|
||||
@@ -140,7 +212,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -141,7 +213,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Removes lore when given null.
|
||||
*
|
||||
* @param lore the lore that will be set
|
||||
|
@ -1347,13 +1347,14 @@ index 0000000000000000000000000000000000000000..6bf3d212a6156ad9ab0e82d1ca0a04f8
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 913cf8308840ca1f365eb1f456f64b96046ed060..6e46302c272b468375f2de3f7f992f55f13805b8 100644
|
||||
index baf49da3dd46039da2f24a4af8b1b8617bb25501..7cf61228754527ddaa6b39b5f1426e0527cdaac9 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -129,4 +129,13 @@ public interface UnsafeValues {
|
||||
@@ -137,4 +137,14 @@ public interface UnsafeValues {
|
||||
|
||||
@ApiStatus.Internal
|
||||
@NotNull
|
||||
DamageSource.Builder createDamageSourceBuilder(@NotNull DamageType damageType);
|
||||
<B extends Keyed> B get(Registry<B> registry, NamespacedKey key);
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ boolean isSupportedApiVersion(String apiVersion);
|
||||
|
@ -2897,7 +2897,7 @@ index 3bf7db7eac81e3cc6f5c6700637d10d1b4b7a47b..77f8b0889cd7039bf041fc052fba33b6
|
||||
* Sends the component to the player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 6e46302c272b468375f2de3f7f992f55f13805b8..01e796e487cc16710f51b457466a37ba70e1e665 100644
|
||||
index 7cf61228754527ddaa6b39b5f1426e0527cdaac9..9082e67324f810857db26bb89ecea7e9f866f80d 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -40,6 +40,7 @@ public interface UnsafeValues {
|
||||
@ -2908,7 +2908,7 @@ index 6e46302c272b468375f2de3f7f992f55f13805b8..01e796e487cc16710f51b457466a37ba
|
||||
Material toLegacy(Material material);
|
||||
|
||||
Material fromLegacy(Material material);
|
||||
@@ -138,4 +139,12 @@ public interface UnsafeValues {
|
||||
@@ -147,4 +148,12 @@ public interface UnsafeValues {
|
||||
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
||||
}
|
||||
// Paper end
|
||||
|
@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 01e796e487cc16710f51b457466a37ba70e1e665..d69e5fa40702c283c370a2f712b51dc2ea3a1fa0 100644
|
||||
index 9082e67324f810857db26bb89ecea7e9f866f80d..da997507b96908027c49dabc6daf7c787dcad95d 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -146,5 +146,12 @@ public interface UnsafeValues {
|
||||
@@ -155,5 +155,12 @@ public interface UnsafeValues {
|
||||
* @return name
|
||||
*/
|
||||
String getTimingsServerName();
|
||||
|
@ -356,10 +356,10 @@ index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
index bd1116adc891b2a4243da205127f5ece76089925..4d4c9efb81ac14950b24a07edcfe1c46ab3caf91 100644
|
||||
index a1615334cae50c7d64ca6d86cb7070405a26b332..e396f351a46e4220fa4df11eaa93d813dced664c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Arrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
@@ -73,7 +73,7 @@ public interface Arrow extends AbstractArrow {
|
||||
@@ -93,7 +93,7 @@ public interface Arrow extends AbstractArrow {
|
||||
* Removes a custom potion effect from this arrow.
|
||||
*
|
||||
* @param type the potion effect type to remove
|
||||
@ -613,7 +613,7 @@ index a0f6f1af304190b4c5db4b284d460f625eeb7801..7e21548cac8515c281ec86853e9272ab
|
||||
* The Block is already broken as this event is called, so #getBlock() will be
|
||||
* AIR in most cases. Use #getBlockState() for more Information about the broken
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
index e534954457a9961a26dbec7ac035bec07e1d6694..8309b030c2120f1496d244f3ebc1094def41c869 100644
|
||||
index e534954457a9961a26dbec7ac035bec07e1d6694..a7c297364805c58ae16895055d8eae0484384b7d 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
@@ -13,6 +13,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
@ -626,6 +626,14 @@ index e534954457a9961a26dbec7ac035bec07e1d6694..8309b030c2120f1496d244f3ebc1094d
|
||||
*/
|
||||
public class BlockExplodeEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -29,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable {
|
||||
this.cancel = false;
|
||||
}
|
||||
|
||||
+ @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield) {
|
||||
this(what, what.getState(), blocks, yield);
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java b/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java
|
||||
index 340fa397e68c024df380a28db21545a0c83d9fa6..79ac8a5db689cf9f8e2ff4cb7c06df6989128d10 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java
|
||||
@ -697,6 +705,31 @@ index e9de00e9e434d36117a672fa9fbfc7c52f284b67..4065432c884324b107d04f4ccd486085
|
||||
*/
|
||||
EXPLOSION,
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
|
||||
index 573165ddf3368a96e1ffc6476eb27c9e29a6f86e..148c4aad384ae8e3b8b22d264a84bddfbcafdf1e 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
|
||||
@@ -12,6 +12,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Called when an entity is damaged by a block
|
||||
+ * <p>
|
||||
+ * For explosions, the Block returned by {@link #getDamager()} has
|
||||
+ * already been cleared. See {@link #getDamagerBlockState()} for a snapshot
|
||||
+ * of the block if it has already been changed.
|
||||
*/
|
||||
public class EntityDamageByBlockEvent extends EntityDamageEvent {
|
||||
private final Block damager;
|
||||
@@ -51,6 +55,9 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent {
|
||||
|
||||
/**
|
||||
* Returns the captured BlockState of the block that damaged the player.
|
||||
+ * <p>
|
||||
+ * This block state is not placed so {@link org.bukkit.block.BlockState#isPlaced}
|
||||
+ * will be false.
|
||||
*
|
||||
* @return the block state
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
index 10d0e18dfd423b108fe381e8142867eb10399359..099efafa14c10910e4ed04abb1823f0c1a96b6a6 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
@ -1466,10 +1499,10 @@ index e7d905b1146b2bdd2da5bdeb6bf3541fb181d59e..c7d3041221742f6655155f19ef2addca
|
||||
void setBlockState(@NotNull BlockState blockState);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 18c2864c99d4dfae16cdb35143486aeebb9a6fd6..d66857825528ee772219440dffa28ad8e820493b 100644
|
||||
index a23d030d2204098be17d8b18021fd0bb79b4431b..f427334c6e875a13aa53052ac1b5a746186b4ffe 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -513,7 +513,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -514,7 +514,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Return an immutable copy of all {@link Attribute}s and their
|
||||
* {@link AttributeModifier}s for a given {@link EquipmentSlot}.<br>
|
||||
|
@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this,
|
||||
You must replace the language file embedded in the server jar.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index dbaf54018a7dd392378869a5a302a880c7a56338..213e3f3de731d85f788a4bfa8d912e1b59c3c045 100644
|
||||
index 86fbc3902989a3baca851ab8c3866af445451787..aea393247c60037fb70cd8d5b8814c9849c85e03 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -235,4 +235,20 @@ public interface ItemFactory {
|
||||
@ -33,10 +33,10 @@ index dbaf54018a7dd392378869a5a302a880c7a56338..213e3f3de731d85f788a4bfa8d912e1b
|
||||
+ // Paper end - add getI18NDisplayName
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 53cc84d1ef6e281e8637ec7406236e1185ad7d82..22bb39a8f124d55b1dce1bcb981a94d763959e59 100644
|
||||
index 22e883c8d737cf9f799c6160ff63d90f99250020..551f31fc91b91702b3093bec20113bee9660a3ec 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -633,5 +633,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -640,5 +640,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public net.kyori.adventure.text.@NotNull Component displayName() {
|
||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
||||
to ensure it meets latest minecraft expectations.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 213e3f3de731d85f788a4bfa8d912e1b59c3c045..898c256140cc7fee2c0cc65cca33a0e86275f115 100644
|
||||
index aea393247c60037fb70cd8d5b8814c9849c85e03..b6b90f2ef735407ac41efa21371cfd6b07c2c66e 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -251,4 +251,18 @@ public interface ItemFactory {
|
||||
@ -30,10 +30,10 @@ index 213e3f3de731d85f788a4bfa8d912e1b59c3c045..898c256140cc7fee2c0cc65cca33a0e8
|
||||
+ // Paper end - ensure server conversions API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 22bb39a8f124d55b1dce1bcb981a94d763959e59..0586a64b780f0dee9899a42ca4ee28d12efd749a 100644
|
||||
index 551f31fc91b91702b3093bec20113bee9660a3ec..76b6c21c68bc55d28b77dd53c988b40c9ae41258 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -552,7 +552,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -559,7 +559,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index 22bb39a8f124d55b1dce1bcb981a94d763959e59..0586a64b780f0dee9899a42ca4ee28d1
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -634,6 +634,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -641,6 +641,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||
}
|
||||
|
||||
|
@ -94,3 +94,16 @@ index 0000000000000000000000000000000000000000..7e4acfff16db80a75e1ff2fee1972b16
|
||||
+ */
|
||||
+ void setMarker(boolean marker);
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 8dc744f253be42191ca04f8e2942c4c618655fa8..aa0f66b7187c800cd22905bfa43af3ffb53edb5f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -1879,7 +1879,7 @@ public interface ItemType extends Keyed, Translatable {
|
||||
ItemType.Typed<ItemMeta> RABBIT_STEW = getItemType("rabbit_stew");
|
||||
ItemType.Typed<ItemMeta> RABBIT_FOOT = getItemType("rabbit_foot");
|
||||
ItemType.Typed<ItemMeta> RABBIT_HIDE = getItemType("rabbit_hide");
|
||||
- ItemType.Typed<ItemMeta> ARMOR_STAND = getItemType("armor_stand");
|
||||
+ ItemType.Typed<com.destroystokyo.paper.inventory.meta.ArmorStandMeta> ARMOR_STAND = getItemType("armor_stand");
|
||||
ItemType.Typed<ItemMeta> IRON_HORSE_ARMOR = getItemType("iron_horse_armor");
|
||||
ItemType.Typed<ItemMeta> GOLDEN_HORSE_ARMOR = getItemType("golden_horse_armor");
|
||||
ItemType.Typed<ItemMeta> DIAMOND_HORSE_ARMOR = getItemType("diamond_horse_armor");
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] PotionEffect clone methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
index 88f720aba13961b08e54b3fd35dbaabc5dd9a4c2..037af5fd6d71a526c0e6620f2db0cd6df9625261 100644
|
||||
index 89d49ce1e9475bf2d3748e483360451359e8cef8..575156c089e45a3d6a43ca6b7adfbc7b473a60ab 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
@@ -107,6 +107,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -109,6 +109,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 0586a64b780f0dee9899a42ca4ee28d12efd749a..b92a86e9d128b1ce6f02962574e30ced74e44bc8 100644
|
||||
index 76b6c21c68bc55d28b77dd53c988b40c9ae41258..8cf07089bc3c60262ff1c4c6740310b48aa4169d 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -661,5 +661,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -668,5 +668,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public String getI18NDisplayName() {
|
||||
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
}
|
||||
|
@ -5,18 +5,10 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a655b2a94a 100644
|
||||
index 8cf07089bc3c60262ff1c4c6740310b48aa4169d..bb77d65fd42f9b53ef88537e814bea652bb230de 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.util.LinkedHashMap;
|
||||
+import java.util.List; // Paper
|
||||
import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@@ -669,5 +670,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -676,5 +676,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
// Requires access to NMS
|
||||
return ensureServerConversions().getMaxItemUseDuration();
|
||||
}
|
||||
@ -90,7 +82,7 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6
|
||||
+ * @deprecated in favor of {@link #lore()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public @Nullable List<String> getLore() {
|
||||
+ public @Nullable java.util.List<String> getLore() {
|
||||
+ if (!hasItemMeta()) {
|
||||
+ return null;
|
||||
+ }
|
||||
@ -105,7 +97,7 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6
|
||||
+ * If the item has lore, returns it, else it will return null
|
||||
+ * @return The lore, or null
|
||||
+ */
|
||||
+ public @Nullable List<net.kyori.adventure.text.Component> lore() {
|
||||
+ public @Nullable java.util.List<net.kyori.adventure.text.Component> lore() {
|
||||
+ if (!this.hasItemMeta()) {
|
||||
+ return null;
|
||||
+ }
|
||||
@ -121,10 +113,10 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6
|
||||
+ * Removes lore when given null.
|
||||
+ *
|
||||
+ * @param lore the lore that will be set
|
||||
+ * @deprecated in favour of {@link #lore(List)}
|
||||
+ * @deprecated in favour of {@link #lore(java.util.List)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setLore(@Nullable List<String> lore) {
|
||||
+ public void setLore(@Nullable java.util.List<String> lore) {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ if (itemMeta == null) {
|
||||
+ throw new IllegalStateException("Cannot set lore on " + getType());
|
||||
@ -139,7 +131,7 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6
|
||||
+ *
|
||||
+ * @param lore the lore that will be set
|
||||
+ */
|
||||
+ public void lore(@Nullable List<? extends net.kyori.adventure.text.Component> lore) {
|
||||
+ public void lore(@Nullable java.util.List<? extends net.kyori.adventure.text.Component> lore) {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ if (itemMeta == null) {
|
||||
+ throw new IllegalStateException("Cannot set lore on " + getType());
|
||||
|
@ -15,10 +15,10 @@ items and experience which is otherwise only properly possible by using
|
||||
internal code.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc8295bfc8 100644
|
||||
index b0c069f65da29c6e9eff8e0490fda43a6bed307c..81a3067ff5ae22943b66051f4613ab9fe095720c 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
@@ -5,14 +5,24 @@ import org.bukkit.entity.LivingEntity;
|
||||
@@ -6,15 +6,25 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -30,6 +30,7 @@ index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc
|
||||
-public class EntityDeathEvent extends EntityEvent {
|
||||
+public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Cancellable { // Paper - make cancellable
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final DamageSource damageSource;
|
||||
private final List<ItemStack> drops;
|
||||
private int dropExp = 0;
|
||||
+ // Paper start - make cancellable
|
||||
@ -42,9 +43,9 @@ index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc
|
||||
+ private float deathSoundPitch;
|
||||
+ // Paper end
|
||||
|
||||
public EntityDeathEvent(@NotNull final LivingEntity entity, @NotNull final List<ItemStack> drops) {
|
||||
this(entity, drops, 0);
|
||||
@@ -74,4 +84,133 @@ public class EntityDeathEvent extends EntityEvent {
|
||||
public EntityDeathEvent(@NotNull final LivingEntity entity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops) {
|
||||
this(entity, damageSource, drops, 0);
|
||||
@@ -87,4 +97,133 @@ public class EntityDeathEvent extends EntityEvent {
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
@ -179,10 +180,10 @@ index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
index 03b4e0300d228e3f3a9f4f75c96e0cf9ed1a7d2d..38f81772edacb178e21c3f273e8c41ed46177d6d 100644
|
||||
index 9473303bd8ab1f6b63b6999a5f5ff3eca1cc23d6..76f00e386110f361549690d20dc0f73884a2fdda 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
@@ -62,6 +62,19 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -63,6 +63,19 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
return (Player) entity;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 2750e143a3ac20797e16a15b687952157197d562..c2808db693647bdf3b9617cb6c665e8499874485 100644
|
||||
index 0a5dfd728a1988d8bc937ea5122dff4cbe546cfe..fb6e030af69b085946a029d89347b19b121f6a14 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -125,6 +125,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -128,6 +128,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* An enum of all material IDs accepted by the official server and client
|
||||
*/
|
||||
@ -16,7 +16,7 @@ index 2750e143a3ac20797e16a15b687952157197d562..c2808db693647bdf3b9617cb6c665e84
|
||||
public enum Material implements Keyed, Translatable {
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
@@ -4725,6 +4726,22 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4728,6 +4729,22 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,10 +300,10 @@ index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3
|
||||
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 c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332c992d3d1 100644
|
||||
index fb6e030af69b085946a029d89347b19b121f6a14..feebabf946913263461e1d0f13a478cf4bfd0f68 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4746,20 +4746,20 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4749,20 +4749,20 @@ public enum Material implements Keyed, Translatable {
|
||||
* Do not use for any reason.
|
||||
*
|
||||
* @return ID of this material
|
||||
@ -328,7 +328,7 @@ index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332
|
||||
public boolean isLegacy() {
|
||||
return legacy;
|
||||
}
|
||||
@@ -4835,8 +4835,10 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4838,8 +4838,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 c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332
|
||||
public Class<? extends MaterialData> getData() {
|
||||
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
|
||||
return ctor.getDeclaringClass();
|
||||
@@ -9103,7 +9105,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -5295,7 +5297,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material.
|
||||
*
|
||||
* @return true if this material can be interacted with.
|
||||
@ -349,8 +349,8 @@ index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public boolean isInteractable() {
|
||||
switch (this) {
|
||||
// <editor-fold defaultstate="collapsed" desc="isInteractable">
|
||||
BlockType type = asBlockType();
|
||||
return type != null && type.isInteractable();
|
||||
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
|
||||
index 9b61129c3ef83d0bfceba54aba2effa12bc90678..cbdaa121dbc1876d0cd55f4b7b57f283ecaa8f1a 100644
|
||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||
@ -453,10 +453,10 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
||||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 4f8c54a84c9f737dad3feff9ffd7daf22854e97f..a04d279561676e825905f5512c399d14a3d8f828 100644
|
||||
index 57dfc408fcf9036808af26bd1255afe104d40286..62a7748b7509907ac8c8c0026f0cc5911f530eb7 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -201,14 +201,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -219,14 +219,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see TrimMaterial
|
||||
*/
|
||||
@ -471,7 +471,7 @@ index 4f8c54a84c9f737dad3feff9ffd7daf22854e97f..a04d279561676e825905f5512c399d14
|
||||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
/**
|
||||
* Damage types.
|
||||
@@ -310,8 +308,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -328,8 +326,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
@ -498,7 +498,7 @@ index 6277451c3c6c551078c237cd767b6d70c4f585ea..10f5cfb1885833a1d2c1027c03974da4
|
||||
CRACKED(0x0),
|
||||
GLYPHED(0x1),
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 69f236d965c631510b008a7eb38aa1b62a4e196a..2382322bc4f30ff3163b2941650692d9a13328ac 100644
|
||||
index 3d5ef29bcfed92dc7fb3bb6d59538ba4a4e3de5f..43f8cdd600aa2c2e33136068b3c4b4b81a6544d4 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -730,9 +730,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@ -1399,7 +1399,7 @@ index 002acfbdce1db10f7ba1b6a013e678f504ac6e69..8d14426eb1ebea27058d5f22ea652f22
|
||||
return getPlayer().getItemOnCursor();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 898c256140cc7fee2c0cc65cca33a0e86275f115..e34c89a945a0f12cdc4be8cc232c8de986474372 100644
|
||||
index b6b90f2ef735407ac41efa21371cfd6b07c2c66e..4c4e52b2c200408c4e33a141e1eed78126ceaaee 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -30,7 +30,7 @@ public interface ItemFactory {
|
||||
@ -1412,18 +1412,18 @@ index 898c256140cc7fee2c0cc65cca33a0e86275f115..e34c89a945a0f12cdc4be8cc232c8de9
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8b8c5aee3 100644
|
||||
index bb77d65fd42f9b53ef88537e814bea652bb230de..d758cea1d8e88937678dbfd0ac72d49b6c160fe0 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@@ -10,6 +10,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Registry;
|
||||
import org.bukkit.Translatable;
|
||||
+import org.bukkit.UndefinedNullability;
|
||||
import org.bukkit.Utility;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@@ -170,8 +171,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -172,8 +173,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
* Gets the MaterialData for this stack of items
|
||||
*
|
||||
* @return MaterialData for this item
|
||||
@ -1434,7 +1434,7 @@ index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8
|
||||
public MaterialData getData() {
|
||||
Material mat = Bukkit.getUnsafe().toLegacy(getType());
|
||||
if (data == null && mat != null && mat.getData() != null) {
|
||||
@@ -185,7 +188,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -187,7 +190,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
* Sets the MaterialData for this stack of items
|
||||
*
|
||||
* @param data New MaterialData for this item
|
||||
@ -1444,7 +1444,7 @@ index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8
|
||||
public void setData(@Nullable MaterialData data) {
|
||||
if (data == null) {
|
||||
this.data = data;
|
||||
@@ -561,7 +566,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -567,7 +572,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
*
|
||||
* @return a copy of the current ItemStack's ItemData
|
||||
*/
|
||||
@ -1587,10 +1587,10 @@ 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 d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bfbe1ff7fd 100644
|
||||
index f427334c6e875a13aa53052ac1b5a746186b4ffe..abe5c56c09a29cb3dcd35936045938c1b88c8500 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -141,6 +141,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -142,6 +142,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Checks for existence of a localized name.
|
||||
*
|
||||
@ -1598,7 +1598,7 @@ index d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bf
|
||||
* @return true if this has a localized name
|
||||
* @deprecated meta no longer exists
|
||||
*/
|
||||
@@ -153,6 +154,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -154,6 +155,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Plugins should check that hasLocalizedName() returns <code>true</code>
|
||||
* before calling this method.
|
||||
*
|
||||
@ -1606,7 +1606,7 @@ index d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bf
|
||||
* @return the localized name that is set
|
||||
* @deprecated meta no longer exists
|
||||
*/
|
||||
@@ -163,6 +165,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -164,6 +166,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Sets the localized name.
|
||||
*
|
||||
|
@ -8,18 +8,10 @@ Exposes a mutable array on items a player should keep on death
|
||||
Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
index 38f81772edacb178e21c3f273e8c41ed46177d6d..9719e183036c361b909b203593c067a551b82264 100644
|
||||
index 76f00e386110f361549690d20dc0f73884a2fdda..edf14dac359e996f76e0af551a81a4dd8e48bd6c 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
@@ -37,7 +37,6 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
}
|
||||
// Paper end - adventure
|
||||
|
||||
- @Deprecated // Paper
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull final List<ItemStack> drops, final int droppedExp, @Nullable final String deathMessage) {
|
||||
this(player, drops, droppedExp, 0, deathMessage);
|
||||
}
|
||||
@@ -56,6 +55,41 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -57,6 +57,41 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
this.deathMessage = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserializeOrNull(deathMessage); // Paper
|
||||
}
|
||||
|
||||
|
@ -5,28 +5,28 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
index 9719e183036c361b909b203593c067a551b82264..66e9d65a8dd05bed05d0ab46ec64206a6dae0507 100644
|
||||
index edf14dac359e996f76e0af551a81a4dd8e48bd6c..bba3821d1215eb00489f841195c890a3f3353912 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
@@ -16,6 +16,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -17,6 +17,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
private int newTotalExp = 0;
|
||||
private boolean keepLevel = false;
|
||||
private boolean keepInventory = false;
|
||||
+ private boolean doExpDrop; // Paper - shouldDropExperience API
|
||||
// Paper start - adventure
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
public PlayerDeathEvent(final @NotNull Player player, final @NotNull List<ItemStack> drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
@@ -29,11 +30,18 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
@@ -30,11 +31,18 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
public PlayerDeathEvent(final @NotNull Player player, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
+ // Paper start - shouldDropExperience API
|
||||
+ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true);
|
||||
+ this(player, damageSource, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true);
|
||||
+ }
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage, final boolean doExpDrop) {
|
||||
+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage, final boolean doExpDrop) {
|
||||
+ // Paper end - shouldDropExperience API
|
||||
super(player, drops, droppedExp);
|
||||
super(player, damageSource, drops, droppedExp);
|
||||
this.newExp = newExp;
|
||||
this.newTotalExp = newTotalExp;
|
||||
this.newLevel = newLevel;
|
||||
@ -35,18 +35,18 @@ index 9719e183036c361b909b203593c067a551b82264..66e9d65a8dd05bed05d0ab46ec64206a
|
||||
}
|
||||
// Paper end - adventure
|
||||
|
||||
@@ -48,11 +56,19 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -50,11 +58,19 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
|
||||
@Deprecated // Paper
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) {
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) {
|
||||
+ // Paper start - shouldDropExperience API
|
||||
+ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true);
|
||||
+ this(player, damageSource, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true);
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated // Paper
|
||||
+ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) {
|
||||
+ public PlayerDeathEvent(@NotNull final Player player, final @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) {
|
||||
+ // Paper end - shouldDropExperience API
|
||||
super(player, drops, droppedExp);
|
||||
super(player, damageSource, drops, droppedExp);
|
||||
this.newExp = newExp;
|
||||
this.newTotalExp = newTotalExp;
|
||||
this.newLevel = newLevel;
|
||||
@ -55,7 +55,7 @@ index 9719e183036c361b909b203593c067a551b82264..66e9d65a8dd05bed05d0ab46ec64206a
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@@ -90,6 +106,22 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -92,6 +108,22 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14f47b341a 100644
|
||||
index da997507b96908027c49dabc6daf7c787dcad95d..cb7aef53cbffc76dea9fec28445ea8aefcb29d62 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -153,5 +153,9 @@ public interface UnsafeValues {
|
||||
@@ -162,5 +162,9 @@ public interface UnsafeValues {
|
||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||
}
|
||||
@ -20,10 +20,10 @@ index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 276cfd52817115981fe7dc46363278f8b8c5aee3..e82eeadc7cb53572351670761c4e592a33345c6b 100644
|
||||
index d758cea1d8e88937678dbfd0ac72d49b6c160fe0..066f99a1f4cc42cf0e87d495f97a0685817dfa18 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -653,6 +653,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -659,6 +659,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
|
||||
}
|
||||
|
||||
|
@ -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 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566a97865cf 100644
|
||||
index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b789c51885d 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;
|
||||
@ -16,7 +16,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
@@ -65,6 +66,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -66,6 +67,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@NotNull
|
||||
String getDisplayName();
|
||||
|
||||
@ -37,7 +37,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566
|
||||
/**
|
||||
* Sets the display name.
|
||||
*
|
||||
@@ -74,6 +89,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -75,6 +90,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Deprecated // Paper
|
||||
void setDisplayName(@Nullable String name);
|
||||
|
||||
@ -54,7 +54,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566
|
||||
/**
|
||||
* Checks for existence of an item name.
|
||||
* <br>
|
||||
@@ -210,6 +235,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -211,6 +236,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Nullable
|
||||
List<String> getLore();
|
||||
|
||||
@ -74,7 +74,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566
|
||||
/**
|
||||
* Sets the lore for this item.
|
||||
* Removes lore when given null.
|
||||
@@ -220,6 +258,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -221,6 +259,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Deprecated // Paper
|
||||
void setLore(@Nullable List<String> lore);
|
||||
|
||||
|
@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa3074560d1459e 100644
|
||||
index feebabf946913263461e1d0f13a478cf4bfd0f68..d6e2ec415eab4f55fd925a3b0982e869befbd088 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -126,7 +126,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -129,7 +129,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* An enum of all material IDs accepted by the official server and client
|
||||
*/
|
||||
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
||||
@ -156,7 +156,7 @@ index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa30745
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
STONE(22948),
|
||||
@@ -4740,6 +4740,15 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4743,6 +4743,15 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -172,7 +172,7 @@ index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa30745
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
@@ -11481,9 +11490,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -5494,9 +5503,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material
|
||||
* @see #getBlockTranslationKey()
|
||||
* @see #getItemTranslationKey()
|
||||
@ -183,7 +183,7 @@ index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa30745
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public String getTranslationKey() {
|
||||
if (this.isItem()) {
|
||||
return Bukkit.getUnsafe().getItemTranslationKey(this);
|
||||
return asItemType().getTranslationKey();
|
||||
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
index eae90e72b1dff5ab3b1a4fdcfe57187e85fe4d49..62d2b3f950860dee0898d77b0a29635c3f9a7e23 100644
|
||||
--- a/src/main/java/org/bukkit/MusicInstrument.java
|
||||
@ -480,10 +480,10 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b141289f182cde 100644
|
||||
index 066f99a1f4cc42cf0e87d495f97a0685817dfa18..23686519b8c1338dd6e9f1c5a0e73467c0b59a4f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* use this class to encapsulate Materials for which {@link Material#isItem()}
|
||||
* returns false.</b>
|
||||
*/
|
||||
@ -492,7 +492,7 @@ index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b14128
|
||||
private Material type = Material.AIR;
|
||||
private int amount = 0;
|
||||
private MaterialData data = null;
|
||||
@@ -620,6 +620,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -626,6 +626,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
@ -500,7 +500,7 @@ index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b14128
|
||||
public String getTranslationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
@@ -879,5 +880,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -885,5 +886,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
ItemMeta itemMeta = getItemMeta();
|
||||
return itemMeta != null && itemMeta.hasItemFlag(flag);
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 30d869a7c4bba79b4c05de7860b31c14f47b341a..241cb853476ea35dad73d0234b2d030e9af23476 100644
|
||||
index cb7aef53cbffc76dea9fec28445ea8aefcb29d62..fb1efc7dfcfbfb823c8ad8fe2943adb99104aefe 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -157,5 +157,12 @@ public interface UnsafeValues {
|
||||
@@ -166,5 +166,12 @@ public interface UnsafeValues {
|
||||
byte[] serializeItem(ItemStack item);
|
||||
|
||||
ItemStack deserializeItem(byte[] data);
|
||||
|
@ -206,10 +206,19 @@ index 732ed3724e784ad659cb4411dbd73b42a8330a2c..7be6710d28dea19bd0f9054c1c2e32da
|
||||
return server.getRegistry(tClass);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f288ba27a40 100644
|
||||
index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6a912079b 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -129,7 +129,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -101,7 +101,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote BlockType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
- Registry<BlockType> BLOCK = Objects.requireNonNull(Bukkit.getRegistry(BlockType.class), "No registry present for BlockType. This is a bug.");
|
||||
+ Registry<BlockType> BLOCK = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.BLOCK); // Paper
|
||||
/**
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -139,7 +139,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Enchantment
|
||||
*/
|
||||
@ -218,16 +227,25 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28
|
||||
/**
|
||||
* Server entity types.
|
||||
*
|
||||
@@ -141,7 +141,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -151,7 +151,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see MusicInstrument
|
||||
*/
|
||||
- Registry<MusicInstrument> INSTRUMENT = Objects.requireNonNull(Bukkit.getRegistry(MusicInstrument.class), "No registry present for MusicInstrument. This is a bug.");
|
||||
+ Registry<MusicInstrument> INSTRUMENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.INSTRUMENT); // Paper
|
||||
/**
|
||||
* Default server loot tables.
|
||||
* Server item types.
|
||||
*
|
||||
@@ -159,7 +159,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote ItemType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
- Registry<ItemType> ITEM = Objects.requireNonNull(Bukkit.getRegistry(ItemType.class), "No registry present for ItemType. This is a bug.");
|
||||
+ Registry<ItemType> ITEM = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.ITEM); // Paper
|
||||
/**
|
||||
* Default server loot tables.
|
||||
*
|
||||
@@ -177,7 +177,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see PotionEffectType
|
||||
*/
|
||||
@ -236,7 +254,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28
|
||||
/**
|
||||
* Server particles.
|
||||
*
|
||||
@@ -182,14 +182,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -200,14 +200,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server structures.
|
||||
*
|
||||
* @see Structure
|
||||
@ -255,7 +273,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28
|
||||
/**
|
||||
* Sound keys.
|
||||
*
|
||||
@@ -200,21 +202,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -218,21 +220,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Trim materials.
|
||||
*
|
||||
* @see TrimMaterial
|
||||
@ -286,7 +304,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28
|
||||
/**
|
||||
* Villager profession.
|
||||
*
|
||||
@@ -268,8 +275,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -286,8 +293,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Wolf variants.
|
||||
*
|
||||
* @see Wolf.Variant
|
||||
@ -298,7 +316,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28
|
||||
/**
|
||||
* Map cursor types.
|
||||
*
|
||||
@@ -282,7 +291,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -300,7 +309,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see GameEvent
|
||||
*/
|
||||
@ -308,7 +326,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28
|
||||
* Get the object by its key.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 395f7910f535bfd33a5676b011ab62a53e30e140..5644af8154373923791e3ed5f8b01c3f5d357b9c 100644
|
||||
index f0c1d16c6bee58826a3cde3c4988e02690207fce..c53268bc4c3ae275ad8765f0848e46e1d6c7372d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2046,8 +2046,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
@ -513,10 +513,10 @@ index 0000000000000000000000000000000000000000..1e7b53f9bc13dcd5a0a4a40004591e4f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 91117cad12eee0bdaac8e0398a0f7f288ba27a40..43f410326d6d68242113e2fefe31af256889ed9c 100644
|
||||
index e5393d3204f4d04d8e9640a45c6b4ba6a912079b..d573d8e36fbe6b7f5a298fb64910feba9cba0697 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -292,6 +292,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -310,6 +310,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Tue, 2 Mar 2021 15:24:58 -0800
|
||||
Subject: [PATCH] Cache the result of Material#isBlock
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 61e0739f002a949a204c7591dfa3074560d1459e..5aa595860c73e78cf3c9f2a8984c62744cfe5612 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4684,6 +4684,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
public final Class<?> data;
|
||||
private final boolean legacy;
|
||||
private final NamespacedKey key;
|
||||
+ private boolean isBlock; // Paper
|
||||
|
||||
private Material(final int id) {
|
||||
this(id, 64);
|
||||
@@ -4887,6 +4888,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
* @return true if this material is a block
|
||||
*/
|
||||
public boolean isBlock() {
|
||||
+ // Paper start - cache isBlock
|
||||
+ return this.isBlock;
|
||||
+ }
|
||||
+ private boolean isBlock0() {
|
||||
+ // Paper end
|
||||
switch (this) {
|
||||
//<editor-fold defaultstate="collapsed" desc="isBlock">
|
||||
case ACACIA_BUTTON:
|
||||
@@ -6131,6 +6137,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
static {
|
||||
for (Material material : values()) {
|
||||
BY_NAME.put(material.name(), material);
|
||||
+ material.isBlock = material.isBlock0(); // Paper
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expand world key API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 732ed3724e784ad659cb4411dbd73b42a8330a2c..d078ea797cf4c6ab291aec3ad7fbd4740017286c 100644
|
||||
index 7be6710d28dea19bd0f9054c1c2e32dacd355c45..8fd1de659777595d9d8198e7ee638ad5500a6317 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -864,6 +864,18 @@ public final class Bukkit {
|
||||
@ -56,7 +56,7 @@ index 27eff0826d5b5b48697fefd9571886e7bbce74b1..d8b1fa79dc24138dc71e32c14bda71c1
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 395f7910f535bfd33a5676b011ab62a53e30e140..e6598c36cfc98282f30a57105986a295f1c94676 100644
|
||||
index c53268bc4c3ae275ad8765f0848e46e1d6c7372d..e1ab2090c1b219f12af382079907e440e9cf4379 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -722,6 +722,17 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@ -78,10 +78,10 @@ index 395f7910f535bfd33a5676b011ab62a53e30e140..e6598c36cfc98282f30a57105986a295
|
||||
* Create a new virtual {@link WorldBorder}.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 241cb853476ea35dad73d0234b2d030e9af23476..5de86f8cd3cc7f7e8ebc4a22d3921273378704f2 100644
|
||||
index fb1efc7dfcfbfb823c8ad8fe2943adb99104aefe..1b2b0e6d10393b4f4d0716256aa4c87b57affbe1 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -164,5 +164,10 @@ public interface UnsafeValues {
|
||||
@@ -173,5 +173,10 @@ public interface UnsafeValues {
|
||||
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
||||
*/
|
||||
public int nextEntityId();
|
@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 5aa595860c73e78cf3c9f2a8984c62744cfe5612..1e4ebe9bdc6aadf18029377e7ce70ca0d88bd1a1 100644
|
||||
index d6e2ec415eab4f55fd925a3b0982e869befbd088..044c563daee7898c676bd6ba58ee395c52eda121 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4750,6 +4750,19 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4752,6 +4752,19 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
return Bukkit.getUnsafe().getBlockTranslationKey(this);
|
||||
}
|
||||
}
|
||||
@ -108,10 +108,10 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 645cff10eef90826bb44bbe937b141289f182cde..a92421bbf0ee40ecbe4f272459c6a918dc45344c 100644
|
||||
index 23686519b8c1338dd6e9f1c5a0e73467c0b59a4f..f0221815cbd30f3ccaacc87a57403491b55de128 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -891,5 +891,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -897,5 +897,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public @NotNull String translationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 5de86f8cd3cc7f7e8ebc4a22d3921273378704f2..a874faec93468c83fc475b60629fc36f933bd11c 100644
|
||||
index 1b2b0e6d10393b4f4d0716256aa4c87b57affbe1..8635846c9f672e39f0929eec7bf83b22536ed284 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -169,5 +169,12 @@ public interface UnsafeValues {
|
||||
@@ -178,5 +178,12 @@ public interface UnsafeValues {
|
||||
* Just don't use it.
|
||||
*/
|
||||
@org.jetbrains.annotations.NotNull String getMainLevelName();
|
@ -144,10 +144,10 @@ index 3d5af25a399589f1bdf95b77f584ae0ae5c26f02..ab512c7ee9d2442055b719d02d0d0ecc
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/packs/DataPackManager.java b/src/main/java/org/bukkit/packs/DataPackManager.java
|
||||
index d7fb6310e6b1050c496d748388310bc6f8d78e23..2cd505046277febe010e9476539b064321d8b2ec 100644
|
||||
index c33ca7b86426223200efa7df53faef061c3c7c0b..5ec17312564e245e6d482e89c2ef2a886d463154 100644
|
||||
--- a/src/main/java/org/bukkit/packs/DataPackManager.java
|
||||
+++ b/src/main/java/org/bukkit/packs/DataPackManager.java
|
||||
@@ -11,8 +11,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -13,8 +13,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Manager of data packs.
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index a874faec93468c83fc475b60629fc36f933bd11c..4130481843c9e0b847bd656622b0c1107ac1297b 100644
|
||||
index 8635846c9f672e39f0929eec7bf83b22536ed284..51f1a09164d501de6d2561ed90175f2c24a668c1 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -176,5 +176,15 @@ public interface UnsafeValues {
|
||||
@@ -185,5 +185,15 @@ public interface UnsafeValues {
|
||||
* @return the server's protocol version
|
||||
*/
|
||||
int getProtocolVersion();
|
||||
@ -25,10 +25,10 @@ index a874faec93468c83fc475b60629fc36f933bd11c..4130481843c9e0b847bd656622b0c110
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index a92421bbf0ee40ecbe4f272459c6a918dc45344c..04ff6579282708c48edee419381c698707fe0a3b 100644
|
||||
index f0221815cbd30f3ccaacc87a57403491b55de128..ca2dac7b377ea098158ff3c84fd47f405b636869 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -903,5 +903,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -909,5 +909,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public io.papermc.paper.inventory.ItemRarity getRarity() {
|
||||
return io.papermc.paper.inventory.ItemRarity.valueOf(this.getItemMeta().getRarity().name());
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack#editMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 04ff6579282708c48edee419381c698707fe0a3b..351f5c0feec38377fccf09bfc1cef2df88fc2dcd 100644
|
||||
index ca2dac7b377ea098158ff3c84fd47f405b636869..5fb8f7c1b79bd256925cb68cccfe0b974fb84043 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -561,6 +561,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -567,6 +567,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return result.ensureServerConversions(); // Paper
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Attributes API for item defaults
|
||||
(Now replaced by upstream's API)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 1e4ebe9bdc6aadf18029377e7ce70ca0d88bd1a1..3cb658023d738617a310099fa3759af253a9f4c2 100644
|
||||
index 044c563daee7898c676bd6ba58ee395c52eda121..f6c3a4de2f07348d599e44d0b3173b8674ee85ac 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4763,6 +4763,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4765,6 +4765,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
|
||||
return new org.bukkit.inventory.ItemStack(this).getRarity();
|
||||
}
|
@ -143,10 +143,10 @@ index 0d88dce9978243a1f995c5fb448c5d71b01136eb..8b1048c94dffd058eb9fd9144f7f59fc
|
||||
+ // Paper end - Horse API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
|
||||
index 3c65da551aca046986fc0302de3ccc149ee9526c..7f989f2025d16b368829c45f08b8cc8537c99e13 100644
|
||||
index 1df234d6538f08724297ed4ad916f6d488736171..3eba2a9f60636c7d58d311d46f0447bb6bcc5cfb 100644
|
||||
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
|
||||
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
|
||||
@@ -239,4 +239,20 @@ public interface AreaEffectCloud extends Entity {
|
||||
@@ -259,4 +259,20 @@ public interface AreaEffectCloud extends Entity {
|
||||
* @param source the {@link ProjectileSource} that threw the LingeringPotion
|
||||
*/
|
||||
public void setSource(@Nullable ProjectileSource source);
|
||||
@ -462,10 +462,10 @@ index c7d6a328def83619dca9b6122aeb5870e4585e70..795e799fec7cfd65a0e08bb3f941148d
|
||||
* Mark the entity's removal.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Fireball.java b/src/main/java/org/bukkit/entity/Fireball.java
|
||||
index 7a44707f2307dc4dbfea4de3f4baf3cc0490dc93..d0e82102425e54274be9c4769634d754319d6196 100644
|
||||
index ceaf263bc554a92a232bd3ed18ea67ce4e0b487a..dc8ed9164f22eb140e16b9b25a82f85b873ada42 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Fireball.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Fireball.java
|
||||
@@ -23,4 +23,32 @@ public interface Fireball extends Projectile, Explosive {
|
||||
@@ -32,4 +32,32 @@ public interface Fireball extends Projectile, Explosive {
|
||||
@NotNull
|
||||
public Vector getDirection();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 4130481843c9e0b847bd656622b0c1107ac1297b..a846f3c6e8dceb90e42db903b8be2c248f2f9d5c 100644
|
||||
index 51f1a09164d501de6d2561ed90175f2c24a668c1..cbc63144e5eb35799548209f8fbee70d0c20a53d 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -186,5 +186,22 @@ public interface UnsafeValues {
|
||||
@@ -195,5 +195,22 @@ public interface UnsafeValues {
|
||||
* @return true if valid repair, false if not
|
||||
*/
|
||||
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 3cb658023d738617a310099fa3759af253a9f4c2..1ca448c9e3a3178663a033617d9414ec085c246a 100644
|
||||
index f6c3a4de2f07348d599e44d0b3173b8674ee85ac..4ad5f2d40c10e7b059a9096dcc6a3b0b618411a0 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4778,6 +4778,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4780,6 +4780,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
||||
return this.getDefaultAttributeModifiers(equipmentSlot);
|
||||
}
|
||||
@ -26,10 +26,10 @@ index 3cb658023d738617a310099fa3759af253a9f4c2..1ca448c9e3a3178663a033617d9414ec
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index a846f3c6e8dceb90e42db903b8be2c248f2f9d5c..e1f9d80f0a6481824443339015049f96f3bf86f2 100644
|
||||
index cbc63144e5eb35799548209f8fbee70d0c20a53d..891204af265ac4ef1f654407421e9962c0ff549b 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -203,5 +203,14 @@ public interface UnsafeValues {
|
||||
@@ -212,5 +212,14 @@ public interface UnsafeValues {
|
||||
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
||||
*/
|
||||
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index e1f9d80f0a6481824443339015049f96f3bf86f2..9245f50b2bac30e956ef6ddc11c551b9b68463ee 100644
|
||||
index 891204af265ac4ef1f654407421e9962c0ff549b..20ddbfdad6856135a4c6a4778f81caee953f0fb4 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -158,6 +158,14 @@ public interface UnsafeValues {
|
||||
@@ -167,6 +167,14 @@ public interface UnsafeValues {
|
||||
|
||||
ItemStack deserializeItem(byte[] data);
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index c3d3c7d05a03658157d49c6ff1ea1d7d085a6fd4..fa7a63ea108971790c28c4f32d280ee6f2a86c0b 100644
|
||||
index e62d46629305a268906cd2cd5d5977d063c2f484..8f88dc00c73810560070195fcf6e0f955e4ebdde 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2105,6 +2105,24 @@ public final class Bukkit {
|
||||
@ -34,7 +34,7 @@ index c3d3c7d05a03658157d49c6ff1ea1d7d085a6fd4..fa7a63ea108971790c28c4f32d280ee6
|
||||
* Creates a boss bar instance to display to players. The progress
|
||||
* defaults to 1.0
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 61ee087ec4a75ee8b10e204b4cdd1bab5f066819..90b1368303562e1b4af2e658e60ac564bd49ad5f 100644
|
||||
index e3a494b9d3727973d225de3042da93594f36ca12..8ccda3cbefcbf1d1b1d5dac195b3c5605058a040 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1779,6 +1779,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
In neuem Issue referenzieren
Einen Benutzer sperren