use of org.bukkit.event.world.ChunkLoadEvent in project BKCommonLib by bergerhealer.
the class EntityAddRemoveHandler_1_8_to_1_13_2 method onEnabled.
@Override
public void onEnabled(CommonPlugin plugin) {
super.onEnabled(plugin);
plugin.register(new Listener() {
@EventHandler(priority = EventPriority.LOWEST)
public void onChunkLoad(ChunkLoadEvent event) {
notifyChunkEntitiesLoaded(event.getChunk());
}
@EventHandler(priority = EventPriority.LOWEST)
public void onChunkUnload(ChunkUnloadEvent event) {
notifyChunkEntitiesUnloaded(event.getChunk());
}
});
}
use of org.bukkit.event.world.ChunkLoadEvent in project BKCommonLib by bergerhealer.
the class EntityAddRemoveHandler_1_14_to_1_16_5 method onEnabled.
@Override
public void onEnabled(CommonPlugin plugin) {
super.onEnabled(plugin);
plugin.register(new Listener() {
@EventHandler(priority = EventPriority.LOWEST)
public void onChunkLoad(ChunkLoadEvent event) {
notifyChunkEntitiesLoaded(event.getChunk());
}
@EventHandler(priority = EventPriority.LOWEST)
public void onChunkUnload(ChunkUnloadEvent event) {
notifyChunkEntitiesUnloaded(event.getChunk());
}
});
}
Aggregations