Api Events
HuskTowns provides several API events your plugin can listen to when players do certain town-related things. These events deal in HuskTowns class types, so you may want to familiarize yourself with the API basics first. Note that on cross-server setups, events only fire on the server the event occured on and will not fire as a result of API calls/updates.
Consult the Javadocs for more informationβand don't forget to register your listener when listening for these event calls.
List of API Events
Bukkit Event class | Cancellable | Description |
---|---|---|
TownCreateEvent | β | Called when a town is created |
TownDisbandEvent | β | Called when a town is deleted |
ClaimEvent | β | Called when a player claims a chunk for a town |
UnClaimEvent | β | Called when a player deletes a claim |
PlayerEnterTownEvent | β | Called when a player walks into a town claim from wilderness or another town |
PlayerLeaveTownEvent | β | Called when a player walks out of a town claim into wilderness or another town |
MemberJoinEvent | β | Called when a player joins a town |
MemberLeaveEvent | β | Called when a player leaves or is evicted from a town |
MemberRoleChangeEvent | β | Called when a player is promoted or demoted within a town |