Fixed issue with removing holograms.

This commit is contained in:
Brianna 2019-10-15 14:07:55 -04:00
parent 29e3eeb5a7
commit 685d94d7e4
2 changed files with 1 additions and 2 deletions

View File

@ -20,7 +20,6 @@ import com.songoda.epicanchors.utils.Methods;
import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.lang.math.NumberUtils;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.PluginManager;

View File

@ -61,6 +61,7 @@ public class Anchor {
ItemStack item = plugin.makeAnchorItem(getTicksLeft()); ItemStack item = plugin.makeAnchorItem(getTicksLeft());
getLocation().getWorld().dropItemNaturally(getLocation(), item); getLocation().getWorld().dropItemNaturally(getLocation(), item);
} }
plugin.clearHologram(this);
location.getBlock().setType(Material.AIR); location.getBlock().setType(Material.AIR);
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_9)) if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_9))
@ -70,7 +71,6 @@ public class Anchor {
? Sound.ENTITY_GENERIC_EXPLODE : Sound.valueOf("EXPLODE"), 10, 10); ? Sound.ENTITY_GENERIC_EXPLODE : Sound.valueOf("EXPLODE"), 10, 10);
plugin.getAnchorManager().removeAnchor(location); plugin.getAnchorManager().removeAnchor(location);
plugin.clearHologram(this);
} }
public Location getLocation() { public Location getLocation() {