Skip to content

Hologram

Namespace Mc.Scripting · Kind class (sealed)

public sealed class Hologram : IDisposable, IPluginResource

Text that floats in the world. The players see it (it is an entity on their side only: the server has none), and it is not saved with the world. Create it with Holograms.Create. It disappears for every viewer when the plugin unloads or when Hologram.Remove is called. Holograms are shown to everybody until Hologram.HideFromAll or Hologram.ShowTo.

Member Description
bool IsActive { get; } Whether the hologram still exists.
HologramOptions Options { get; set; } The look of the hologram.
Vec3d Position { get; } Where it is.
Component Text { get; set; } The text (a component; a newline makes a line break).
public bool IsActive { get; }

Whether the hologram still exists.

public HologramOptions Options { get; set; }

The look of the hologram. Assign a new HologramOptions to change it.

public Vec3d Position { get; }

Where it is.

public Component Text { get; set; }

The text (a component; a newline makes a line break).

Member Description
void Dispose()
Hologram HideFrom(Player player) Hides the hologram from one player (while it is shown to everybody).
Hologram HideFromAll() Hides the hologram from everybody (clears the list of players it is shown to or hidden from).
Hologram Move(Vec3d position) Moves the hologram inside its world.
void Remove() Removes the hologram from every viewer and deletes it.
Hologram ShowTo(Player player) Shows the hologram to one player (after Hologram.HideFromAll), or hides it from one player while it is shown to everybody.
Hologram ShowToAll() Shows the hologram to everybody again (clears the list of players it is shown to or hidden from).
public void Dispose()
public Hologram HideFrom(Player player)

Hides the hologram from one player (while it is shown to everybody).

Parameters

Name Type Description
player Player The player.

Returns Hologram: This hologram.

public Hologram HideFromAll()

Hides the hologram from everybody (clears the list of players it is shown to or hidden from).

Returns Hologram: This hologram.

public Hologram Move(Vec3d position)

Moves the hologram inside its world.

Parameters

Name Type Description
position Vec3d The new position.

Returns Hologram: This hologram.

public void Remove()

Removes the hologram from every viewer and deletes it.

public Hologram ShowTo(Player player)

Shows the hologram to one player (after Hologram.HideFromAll), or hides it from one player while it is shown to everybody.

Parameters

Name Type Description
player Player The player.

Returns Hologram: This hologram.

public Hologram ShowToAll()

Shows the hologram to everybody again (clears the list of players it is shown to or hidden from).

Returns Hologram: This hologram.

Component · HologramOptions · IPluginResource · Player · Vec3d