Interface Facet.FakeEntity<V,​P>

  • Type Parameters:
    V - a viewer type
    P - a position type
    All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, Facet<V>, Facet.Position<V,​P>
    All Known Subinterfaces:
    Facet.BossBarEntity<V,​P>
    Enclosing interface:
    Facet<V>

    public static interface Facet.FakeEntity<V,​P>
    extends Facet.Position<V,​P>, java.io.Closeable
    A facet for spawning client-side entities.
    Since:
    4.0.0
    • Method Detail

      • teleport

        void teleport​(@NotNull
                      V viewer,
                      @Nullable
                      P position)
        Teleports the entity for a viewer.
        Parameters:
        viewer - a viewer
        position - an entity position or null to remove
        Since:
        4.0.0
      • metadata

        void metadata​(int position,
                      @NotNull
                      @NotNull java.lang.Object data)
        Sets the entity metadata.
        Parameters:
        position - a metadata position
        data - a value
        Since:
        4.0.0
      • invisible

        void invisible​(boolean invisible)
        Sets the entity visibility.
        Parameters:
        invisible - if invisible
        Since:
        4.0.0
      • health

        void health​(float health)
        Sets the entity health.
        Parameters:
        health - health level, between 0 and 1
        Since:
        4.0.0
      • name

        void name​(@NotNull
                  @NotNull Component name)
        Sets the entity name.
        Parameters:
        name - a name
        Since:
        4.0.0
      • close

        void close()
        Remove the entity for all viewers.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Since:
        4.0.0