Interface Facet.FakeEntity<V,P>
-
- Type Parameters:
V- a viewer typeP- a position type
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,Facet<V>,Facet.Position<V,P>
- All Known Subinterfaces:
Facet.BossBarEntity<V,P>
public static interface Facet.FakeEntity<V,P> extends Facet.Position<V,P>, java.io.Closeable
A facet for spawning client-side entities.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.kyori.adventure.platform.facet.Facet
Facet.ActionBar<V,M>, Facet.Book<V,M,B>, Facet.BossBar<V>, Facet.BossBarEntity<V,P>, Facet.BossBarPacket<V>, Facet.Chat<V,M>, Facet.ChatPacket<V,M>, Facet.FakeEntity<V,P>, Facet.Message<V,M>, Facet.Position<V,P>, Facet.Sound<V,P>, Facet.Title<V,M,T>, Facet.TitlePacket<V,M,T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Remove the entity for all viewers.voidhealth(float health)Sets the entity health.voidinvisible(boolean invisible)Sets the entity visibility.voidmetadata(int position, @NonNull java.lang.Object data)Sets the entity metadata.voidname(@NonNull net.kyori.adventure.text.Component name)Sets the entity name.voidteleport(@NonNull V viewer, @Nullable P position)Teleports the entity for a viewer.-
Methods inherited from interface net.kyori.adventure.platform.facet.Facet
isApplicable, isSupported
-
Methods inherited from interface net.kyori.adventure.platform.facet.Facet.Position
createPosition, createPosition
-
-
-
-
Method Detail
-
teleport
void teleport(@NonNull V viewer, @Nullable P position)
Teleports the entity for a viewer.- Parameters:
viewer- a viewerposition- an entity position ornullto remove
-
metadata
void metadata(int position, @NonNull java.lang.Object data)Sets the entity metadata.- Parameters:
position- a metadata positiondata- a value
-
invisible
void invisible(boolean invisible)
Sets the entity visibility.- Parameters:
invisible- if invisible
-
health
void health(float health)
Sets the entity health.- Parameters:
health- health level, between 0 and 1
-
name
void name(@NonNull net.kyori.adventure.text.Component name)
Sets the entity name.- Parameters:
name- a name
-
close
void close()
Remove the entity for all viewers.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-