mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
1cfd363d32
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: fc460d1b PR-735: Add Villager#zombify c8c8331e PR-690: Add method to read ItemStack input 62845f2f SPIGOT-6829: Add per-player world border API CraftBukkit Changes: a459f4d4 PR-1033: Add Villager#zombify d65d1430 PR-975: Add method to read ItemStack input b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil 6c308e1b SPIGOT-6829: Add per-player world border API Spigot Changes: 42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
73 lines
3.8 KiB
Diff
73 lines
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: ysl3000 <yannicklamprecht@live.de>
|
|
Date: Mon, 6 Jul 2020 22:17:37 +0200
|
|
Subject: [PATCH] Create HoverEvent from ItemStack Entity
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
index 50fe28b48d885c782278bdb53a0bbae303f4a32d..34c13845f4916fb167fc9d83fe792975e5c52bdc 100644
|
|
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
|
@@ -204,5 +204,62 @@ public interface ItemFactory {
|
|
*/
|
|
@NotNull
|
|
ItemStack ensureServerConversions(@NotNull ItemStack item);
|
|
+
|
|
+ /**
|
|
+ * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying.
|
|
+ *
|
|
+ * @param itemStack
|
|
+ * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack
|
|
+ */
|
|
+ @NotNull
|
|
+ net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull ItemStack itemStack);
|
|
+
|
|
+ /**
|
|
+ * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} for displaying.
|
|
+ * Uses the display name of the entity, if present.
|
|
+ *
|
|
+ * @param entity Entity to create the HoverEvent for
|
|
+ * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity}
|
|
+ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent()}
|
|
+ */
|
|
+ @NotNull
|
|
+ @Deprecated
|
|
+ net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity);
|
|
+
|
|
+ /**
|
|
+ * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} for displaying.
|
|
+ *
|
|
+ * @param entity Entity to create the HoverEvent for
|
|
+ * @param customName a custom name that should be displayed, if not passed entity name will be displayed
|
|
+ * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity}
|
|
+ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent(java.util.function.UnaryOperator)}
|
|
+ */
|
|
+ @NotNull
|
|
+ @Deprecated
|
|
+ net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @Nullable String customName);
|
|
+
|
|
+ /**
|
|
+ * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} for displaying.
|
|
+ *
|
|
+ * @param entity Entity to create the HoverEvent for
|
|
+ * @param customName a custom name that should be displayed, if not passed entity name will be displayed
|
|
+ * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity}
|
|
+ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent(java.util.function.UnaryOperator)}
|
|
+ */
|
|
+ @NotNull
|
|
+ @Deprecated
|
|
+ net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @Nullable net.md_5.bungee.api.chat.BaseComponent customName);
|
|
+
|
|
+ /**
|
|
+ * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} for displaying.
|
|
+ *
|
|
+ * @param entity Entity to create the HoverEvent for
|
|
+ * @param customName a custom name that should be displayed, if not passed entity name will be displayed
|
|
+ * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity}
|
|
+ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent(java.util.function.UnaryOperator)}
|
|
+ */
|
|
+ @NotNull
|
|
+ @Deprecated
|
|
+ net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
|
|
// Paper end
|
|
}
|