From 586ae1e873ce1fede23b15750730ceea93a8c5c9 Mon Sep 17 00:00:00 2001 From: d0by Date: Thu, 24 Feb 2022 19:07:26 +0100 Subject: [PATCH] Add updateHologram method into DHAPI --- .../java/eu/decentsoftware/holograms/api/DHAPI.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/eu/decentsoftware/holograms/api/DHAPI.java b/src/main/java/eu/decentsoftware/holograms/api/DHAPI.java index 96092371..d3b99896 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/DHAPI.java +++ b/src/main/java/eu/decentsoftware/holograms/api/DHAPI.java @@ -123,6 +123,18 @@ public static void moveHologram(Hologram hologram, Location location) throws Ill hologram.save(); } + /** + * Update the given hologram for all viewers. + * + * @param name The holograms name. + */ + public static void updateHologram(String name) { + Validate.notNull(name); + + Hologram hologram = getHologram(name); + hologram.updateAll(); + } + /** * Remove a hologram by its name. *