Allows claims to update on dynmap (#173)

Change from Sponge event listeners to Kyori listeners
This commit is contained in:
Jesse McKee 2020-04-20 10:57:14 -05:00 committed by GitHub
parent bfc5e08c38
commit 3dbce18e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}
}