Code example for EventBus

Methods: post

0
 
    private ChunkMonitor() { 
    } 
 
    private static void post(Object event) { 
        EVENT_BUS.post(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) {
            entry = new ChunkMonitorEntry(pos);
            CHUNKS.put(pos, entry);
        } 
        entry.addChunk(chunk);
        return entry;
    }