From 3dbce18e8216f48054470aa4b58d76745aa6ecbb Mon Sep 17 00:00:00 2001 From: Jesse McKee Date: Mon, 20 Apr 2020 10:57:14 -0500 Subject: [PATCH] Allows claims to update on dynmap (#173) Change from Sponge event listeners to Kyori listeners --- .../griefdefender/provider/DynmapProvider.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sponge/src/main/java/com/griefdefender/provider/DynmapProvider.java b/sponge/src/main/java/com/griefdefender/provider/DynmapProvider.java index 02f14c0..1db6343 100644 --- a/sponge/src/main/java/com/griefdefender/provider/DynmapProvider.java +++ b/sponge/src/main/java/com/griefdefender/provider/DynmapProvider.java @@ -37,12 +37,11 @@ import com.griefdefender.api.event.CreateClaimEvent; import com.griefdefender.api.event.RemoveClaimEvent; import com.griefdefender.claim.GDClaim; -import com.griefdefender.configuration.category.DynmapOwnerStyleCategory; import com.griefdefender.configuration.category.DynmapCategory; +import com.griefdefender.configuration.category.DynmapOwnerStyleCategory; import com.griefdefender.util.PlayerUtil; - +import net.kyori.event.method.annotation.Subscribe; import net.kyori.text.serializer.plain.PlainComponentSerializer; - import org.dynmap.DynmapCommonAPI; import org.dynmap.DynmapCommonAPIListener; import org.dynmap.markers.AreaMarker; @@ -50,8 +49,6 @@ import org.dynmap.markers.MarkerSet; import org.slf4j.Logger; import org.spongepowered.api.Sponge; -import org.spongepowered.api.event.Listener; -import org.spongepowered.api.event.Order; import org.spongepowered.api.scheduler.Task; import org.spongepowered.api.world.World; @@ -338,18 +335,18 @@ public void accept(Task t) { } } - @Listener(order = Order.POST) + @Subscribe public void onClaimCreate(CreateClaimEvent event) { new GriefDefenderUpdate(20L); } - @Listener(order = Order.POST) + @Subscribe public void onClaimDelete(RemoveClaimEvent event) { new GriefDefenderUpdate(20L); } - @Listener(order = Order.POST) + @Subscribe public void onClaimChange(ChangeClaimEvent event) { new GriefDefenderUpdate(20L); } -} \ No newline at end of file +}