Simple Hologram Class

Heya,

This is a pretty simple class for handling multi-line holograms. Usage looks like this:

Hologram singleLine = new Hologram(spawnLocation, Text.of("Hello, World!"));

Hologram multiLine = new Hologram(spawnLocation.add(0f, 0f, 5f), 
		Text.of("Hello,"),
		Text.builder("World!").color(TextColors.BLUE).build());

Hologram wide = new Hologram(spawnLocation.add(0f, 0f, 10f), 1f, 
		Text.of("foo"), 
		Text.of("bar"),
		Text.of("baz"));

Hologram later = new Hologram(spawnLocation.add(0f, 0f, 15f), 
		Text.of("Starting in..."), 
		Text.of("5"));

// ...

later.text(1, Text.of("4"));

// ...

// Shrinks to one line
later.text(Text.of("Go!"));

// ...

later.kill();

You can find it here. It’s public license so use it as you want.

Thanks.

1 Like