From 780444bb2bd79a8bf585294a014770e9bec4e0e1 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Wed, 17 May 2023 16:47:47 +0200 Subject: [PATCH] fix TNTPrimeEvent deprecation warning --- .../insights/listeners/PaperEntityListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 {