-
-
Notifications
You must be signed in to change notification settings - Fork 50
API Events
github-actions[bot] edited this page Jun 21, 2025
·
11 revisions
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 occurred 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.
| Bukkit Event class | Since | Cancellable | Description |
|---|---|---|---|
TownCreateEvent |
1.8 | β | Called when a town is created |
PostTownCreateEvent |
2.6 | β | Called after a town is created |
TownUpdateEvent |
3.1.3 | β | Called when a town is updated |
TownDisbandEvent |
1.8 | β | Called when a town is deleted |
ClaimEvent |
1.8 | β | Called when a player claims a chunk for a town |
UnClaimEvent |
1.8 | β | Called when a player deletes a claim |
UnClaimAllEvent |
2.1 | β | Called when a player deletes all of a town's claims |
PlayerEnterTownEvent |
2.0 | β | Called when a player walks into a town claim from wilderness or another town |
PlayerLeaveTownEvent |
2.0 | β | Called when a player walks out of a town claim into wilderness or another town |
MemberJoinEvent |
2.0 | β | Called when a player joins a town |
MemberLeaveEvent |
2.0 | β | Called when a player leaves or is evicted from a town |
MemberRoleChangeEvent |
2.0 | β | Called when a player is promoted or demoted within a town |
TownWarCreateEvent |
3.0.6 | β | Called when a town war starts |
TownWarEndEvent |
3.0.6 | β | Called when a town war ends |
| This documentation is available via william278.net |
|---|
- π Setup
- π¦ Legacy Migration
- π Database
- β Redis Support
- π Config Files
- π Translations
- π Hooks
- π₯οΈ Commands
- ποΈ Towns
- π Claims
- π¨ Roles
- π Advancements
- β―οΈ Relations
- βοΈ Wars
- π« Inactive Town Pruning
- π¦ API v3
- π§‘ Towns API
- βοΈ Claims API
- π¬ Operations API
- β API Events
- πΈοΈ API v1 (Legacy)
- π» GitHub
- π Buy HuskTowns
- πSpigot
- πPolymart
- πCraftaro
- πBuiltByBit
- π¬ Discord Support