Package net.kyori.adventure.text.object
Interface ObjectContents
- All Superinterfaces:
net.kyori.examination.Examinable
- All Known Subinterfaces:
PlayerHeadObjectContents,SpriteObjectContents
public interface ObjectContents
extends net.kyori.examination.Examinable
An object component contents.
- Since:
- 4.25.0
- Since Minecraft:
- 1.21.9
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic @NotNull PlayerHeadObjectContents.BuilderCreates a player head contents builder.static @NotNull PlayerHeadObjectContentsplayerHead(@NotNull PlayerHeadObjectContents.SkinSource skinSource) Creates a player head contents with the given parameters.static @NotNull PlayerHeadObjectContentsplayerHead(@Nullable String name, @Nullable UUID id) Creates a player head contents with the given parameters.static @NotNull PlayerHeadObjectContentsplayerHead(@Nullable String name, @Nullable UUID id, @NotNull Collection<PlayerHeadObjectContents.ProfileProperty> properties) Creates a player head contents with the given parameters.static @NotNull SpriteObjectContentsCreates a sprite contents with the given sprite and the default atlas.static @NotNull SpriteObjectContentsCreates a sprite contents with the given atlas and sprite.Methods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examine
-
Method Details
-
sprite
@Contract(value="_, _ -> new", pure=true) @NotNull static @NotNull SpriteObjectContents sprite(@NotNull @NotNull Key atlas, @NotNull @NotNull Key sprite) Creates a sprite contents with the given atlas and sprite.- Parameters:
atlas- the atlassprite- the sprite- Returns:
- a sprite contents
- Since:
- 4.25.0
-
sprite
@Contract(value="_ -> new", pure=true) @NotNull static @NotNull SpriteObjectContents sprite(@NotNull @NotNull Key sprite) Creates a sprite contents with the given sprite and the default atlas.- Parameters:
sprite- the sprite- Returns:
- a sprite contents
- Since:
- 4.25.0
-
playerHead
Creates a player head contents builder.- Returns:
- a player head contents builder
- Since:
- 4.25.0
-
playerHead
@Contract(value="_, _ -> new", pure=true) @NotNull static @NotNull PlayerHeadObjectContents playerHead(@Nullable @Nullable String name, @Nullable @Nullable UUID id) Creates a player head contents with the given parameters.- Parameters:
name- the player name, may be nullid- the player UUID, may be null- Returns:
- a player head contents
- Since:
- 4.25.0
-
playerHead
@Contract(value="_, _, _ -> new", pure=true) @NotNull static @NotNull PlayerHeadObjectContents playerHead(@Nullable @Nullable String name, @Nullable @Nullable UUID id, @NotNull @NotNull Collection<PlayerHeadObjectContents.ProfileProperty> properties) Creates a player head contents with the given parameters.- Parameters:
name- the player name, may be nullid- the player UUID, may be nullproperties- the player properties, must not be null- Returns:
- a player head contents
- Since:
- 4.25.0
-
playerHead
@Contract(value="_ -> new", pure=true) @NotNull static @NotNull PlayerHeadObjectContents playerHead(@NotNull PlayerHeadObjectContents.SkinSource skinSource) Creates a player head contents with the given parameters.- Parameters:
skinSource- the skin source- Returns:
- a player head contents
- Since:
- 4.25.0
-