Hologram
Namespace Mc.Scripting · Kind class (sealed)
public sealed class Hologram : IDisposable, IPluginResourceText 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.
Properties
Section titled “Properties”| 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). |
IsActive
Section titled “IsActive”public bool IsActive { get; }Whether the hologram still exists.
Options
Section titled “Options”public HologramOptions Options { get; set; }The look of the hologram. Assign a new HologramOptions to change it.
Position
Section titled “Position”public Vec3d Position { get; }Where it is.
public Component Text { get; set; }The text (a component; a newline makes a line break).
Methods
Section titled “Methods”| 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). |
Dispose
Section titled “Dispose”public void Dispose()HideFrom
Section titled “HideFrom”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.
HideFromAll
Section titled “HideFromAll”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.
Remove
Section titled “Remove”public void Remove()Removes the hologram from every viewer and deletes it.
ShowTo
Section titled “ShowTo”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.
ShowToAll
Section titled “ShowToAll”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.
See also
Section titled “See also”Component · HologramOptions · IPluginResource · Player · Vec3d