Events API [question]
BaxAndrei opened this issue ยท 2 comments
How can I make so my plugin can send an event to my data-base when an admin mutes/kicks or bans a player?Its it even possible to do something like that using essentials api?
For mutes, you can listen for the MuteStatusChangeEvent
, which includes the IUser of the player who was muted/unmuted (getAffected
) and the person who muted/unmuted them (getController
).
For kicks, you can use Bukkit's PlayerKickEvent
.
There is no API for bans, so you'll need to do your own detection logic (observing commands etc).