Skip to content

Commit

Permalink
Fixes FancyHolograms HologramDriver implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
anjoismysign committed Aug 2, 2024
1 parent 04966ef commit 8f41070
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.joml.Vector3f;

import java.util.List;
import java.util.Objects;

public class FancyHolograms implements HologramDriver {

Expand All @@ -33,7 +34,7 @@ public void create(String name,
saveToConfig,
false,
Color.fromARGB(0, 0, 0, 0),
null,
Display.Billboard.VERTICAL,
null,
false,
-1,
Expand Down Expand Up @@ -85,7 +86,8 @@ public void create(String name,
}

@Nullable
public Hologram get(String name) {
public Hologram get(@NotNull String name) {
Objects.requireNonNull(name, "'name' cannot be null");
HologramManager manager = FancyHologramsPlugin.get().getHologramManager();
return manager.getHologram(name).orElse(null);
}
Expand All @@ -103,7 +105,7 @@ public void remove(String name) {
Hologram hologram = get(name);
if (hologram == null)
return;
hologram.deleteHologram();
FancyHologramsPlugin.get().getHologramManager().removeHologram(hologram);
}

@Override
Expand Down

0 comments on commit 8f41070

Please sign in to comment.