13
0
geforkt von Mirrors/Paper

Create HoverEvent from ItemStack Entity

Dieser Commit ist enthalten in:
ysl3000 2020-07-06 22:17:37 +02:00
Ursprung f610d0b477
Commit 124e1f8619

Datei anzeigen

@ -250,4 +250,65 @@ public interface ItemFactory {
@NotNull
ItemStack ensureServerConversions(@NotNull ItemStack item);
// Paper end - ensure server conversions API
// Paper start - bungee hover events
/**
* Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying.
*
* @param itemStack the itemstack
* @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack
* @deprecated use {@link ItemStack#asHoverEvent()}
*/
@NotNull
@Deprecated // Paper
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 - bungee hover events
}