diff --git a/Insights/src/main/java/dev/frankheijden/insights/listeners/PaperEntityListener.java b/Insights/src/main/java/dev/frankheijden/insights/listeners/PaperEntityListener.java index 09bfb565..ce94fcc6 100644 --- a/Insights/src/main/java/dev/frankheijden/insights/listeners/PaperEntityListener.java +++ b/Insights/src/main/java/dev/frankheijden/insights/listeners/PaperEntityListener.java @@ -1,11 +1,11 @@ package dev.frankheijden.insights.listeners; -import com.destroystokyo.paper.event.block.TNTPrimeEvent; import dev.frankheijden.insights.api.InsightsPlugin; import dev.frankheijden.insights.api.objects.wrappers.ScanObject; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.block.TNTPrimeEvent; public class PaperEntityListener extends EntityListener { @@ -26,11 +26,11 @@ public void onEntityRemove(com.destroystokyo.paper.event.entity.EntityRemoveFrom */ @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onTNTPrime(TNTPrimeEvent event) { - var primerEntity = event.getPrimerEntity(); + var primingEntity = event.getPrimingEntity(); var block = event.getBlock(); - if (primerEntity instanceof Player) { - var player = (Player) primerEntity; + if (primingEntity instanceof Player) { + var player = (Player) primingEntity; handleRemoval(player, block.getLocation(), ScanObject.of(block.getType()), 1, false); } else {