diff --git a/decent-holograms-nms/decent-holograms-nms-commons/src/main/java/eu/decentsoftware/holograms/nms/event/PacketPlayInUseEntityEvent.java b/decent-holograms-nms/decent-holograms-nms-commons/src/main/java/eu/decentsoftware/holograms/nms/event/PacketPlayInUseEntityEvent.java index b2e5fb4..cc54dec 100644 --- a/decent-holograms-nms/decent-holograms-nms-commons/src/main/java/eu/decentsoftware/holograms/nms/event/PacketPlayInUseEntityEvent.java +++ b/decent-holograms-nms/decent-holograms-nms-commons/src/main/java/eu/decentsoftware/holograms/nms/event/PacketPlayInUseEntityEvent.java @@ -4,7 +4,6 @@ import eu.decentsoftware.holograms.api.hologram.component.ClickType; import lombok.Getter; import lombok.NonNull; -import lombok.RequiredArgsConstructor; import lombok.Setter; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; @@ -18,12 +17,18 @@ */ @Getter @Setter -@RequiredArgsConstructor public class PacketPlayInUseEntityEvent extends DecentHologramsEvent implements Cancellable { private final @NonNull Player player; private final int entityId; private final @NonNull ClickType clickType; - private boolean cancelled; + private boolean cancelled = false; + + public PacketPlayInUseEntityEvent(@NonNull Player player, int entityId, @NonNull ClickType clickType) { + super(true); + this.player = player; + this.entityId = entityId; + this.clickType = clickType; + } } \ No newline at end of file diff --git a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/profile/ProfileContext.java b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/profile/ProfileContext.java index 2ce3e99..456c1cd 100644 --- a/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/profile/ProfileContext.java +++ b/decent-holograms-plugin/src/main/java/eu/decentsoftware/holograms/profile/ProfileContext.java @@ -71,7 +71,7 @@ public ProfileContext() { public void moveOrCreateClickableEntity(@NonNull Player player, @NonNull Location location) { NMSAdapter nmsAdapter = DecentHolograms.getInstance().getNMSManager().getAdapter(); if (clickableEntitySpawned) { - nmsAdapter.teleportEntity(player, clickableEntityId, location, true); + nmsAdapter.teleportEntity(player, clickableEntityId, location, false); } else { nmsAdapter.spawnEntityLiving(player, clickableEntityId, UUID.randomUUID(), EntityType.SLIME, location); Object metaProperties = nmsAdapter.getMetaEntityProperties(