Method must have an Event as its first parameter
Closed this issue · 2 comments
Sir-Will commented
hey,
I'm unable to use the events as I'm getting the error that the GD events are not a instance of the Sponge events.
Am I supposed to a different Listener then org.spongepowered.api.event.Listener
?
bloodmc commented
GriefDefender's API is cross-platform and does not use Sponge's API. It uses Kyori's Event library. See https://github.com/bloodmc/ClaimTweaks for an example on how to migrate to new event API.
Sir-Will commented
Ah, thanks.
Is there a better way to get the player from the CreateClaimEvent
, other than getting it from the claim?
final Player player = Sponge.getServer().getPlayer(event.getClaim().getOwnerUniqueId()).orElse(null);