Would be nice to have some feature in the API for this. Currently I have to listen to an additional PlayerJoinEvent.
For example, an advancement based on how many chunks are in the town you're currently in.
Currently:
class ChunkClaimAdv extends BaseAdvancement {
// ...
ChunkClaimAdv(/*...*/) {
super();
registerEvent(PlayerJoinEvent.class, event -> {
// towny claim logic, get players town chunks
});
registerEvent(TownChunkClaimEvent.class, event -> {
// additional towny claim logic, loop thru all ONLINE players in the town.
}
}
}
With offline player support:
class ChunkClaimAdv extends BaseAdvancement {
// ...
ChunkClaimAdv(/*...*/) {
super();
registerEvent(TownChunkClaimEvent.class, event -> {
// towny claim logic, loop thru all online AND offline players in the town.
// offline progression is applied by the API on player join
}
}
}
Would be nice to have some feature in the API for this. Currently I have to listen to an additional PlayerJoinEvent.
For example, an advancement based on how many chunks are in the town you're currently in.
Currently:
With offline player support: