1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fixed holograms cache

This commit is contained in:
TheBusyBiscuit 2021-01-15 01:37:55 +01:00
parent 3ea2fccf25
commit 5ea34a895d

View File

@ -119,7 +119,7 @@ public class HologramsService {
Hologram hologram = cache.get(position); Hologram hologram = cache.get(position);
// Check if the ArmorStand was cached and still exists // Check if the ArmorStand was cached and still exists
if (hologram != null && hologram.hasDespawned()) { if (hologram != null && !hologram.hasDespawned()) {
return hologram; return hologram;
} }
@ -263,6 +263,7 @@ public class HologramsService {
Hologram hologram = getHologram(loc, false); Hologram hologram = getHologram(loc, false);
if (hologram != null) { if (hologram != null) {
cache.remove(new BlockPosition(loc));
hologram.remove(); hologram.remove();
return true; return true;
} else { } else {