Code example for EventBus

import java.util.List;
import java.util.Map;
public final class ChunkMonitor { 
    private static final EventBus EVENT_BUS = new EventBus("ChunkMonitor");
    private static final Map<Vector3i, ChunkMonitorEntry> CHUNKS = Maps.newConcurrentMap();
    private ChunkMonitor() { 
    private static void post(Object event) {;
    private static synchronized ChunkMonitorEntry registerChunk(Chunk chunk) {
        Preconditions.checkNotNull(chunk, "The parameter 'chunk' must not be null");
        final Vector3i pos = chunk.getPosition();
        ChunkMonitorEntry entry = CHUNKS.get(pos);
        if (entry == null) {
Experience pair programming with AI  Get Codota for Java