EssentialsX

EssentialsX

2M Downloads

Events API [question]

BaxAndrei opened this issue ยท 2 comments

commented

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?

commented

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).

commented

Thanx.