From 33fddd2552d90beba8f981aa44f8b1c8d57e4aed Mon Sep 17 00:00:00 2001 From: rlf Date: Sat, 17 Oct 2015 03:25:20 +0200 Subject: [PATCH] move holograms immediately on /hgs move --- .../wolfencraft/view/hologram/HologramsView.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/dk/lockfuglsang/wolfencraft/view/hologram/HologramsView.java b/src/main/java/dk/lockfuglsang/wolfencraft/view/hologram/HologramsView.java index 659734d..6f75c9a 100644 --- a/src/main/java/dk/lockfuglsang/wolfencraft/view/hologram/HologramsView.java +++ b/src/main/java/dk/lockfuglsang/wolfencraft/view/hologram/HologramsView.java @@ -2,6 +2,7 @@ import com.sainttx.holograms.data.Hologram; import org.bukkit.Bukkit; +import org.bukkit.Location; import org.bukkit.plugin.Plugin; import java.util.concurrent.Callable; @@ -24,6 +25,14 @@ public void removeView() { } } + @Override + public void setLocation(Location location) { + super.setLocation(location); + if (hologram != null) { + hologram.teleport(location); + } + } + private class SyncCallable implements Callable { private final Plugin plugin; private final String[] lines;