package com.untamedears.citadel.listener;

import org.bukkit.Chunk;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.world.ChunkUnloadEvent;

import com.untamedears.citadel.Citadel;
import com.untamedears.citadel.dao.CitadelCachingDao;

public class ChunkListener implements Listener {
    private CitadelCachingDao cdao_;

    public ChunkListener(CitadelCachingDao cdao) {
        this.cdao_ = cdao;
    }

    /**
     * This handles the ChunkUnloadEvent for the CitadelCachingDao to remove
     * chunks from the cache
     *
     * @param cue ChunkUnloadEvent
     */
    @EventHandler(ignoreCancelled = true)
    public void chunkUnload(ChunkUnloadEvent cue) {
        Chunk chunk = cue.getChunk();
		Citadel.info("Chunk unloading: " + chunk.toString());
        this.cdao_.unloadChunk(chunk);
    }
}

@@ -749,64 +749,8 @@
 ();%0A
-%09%09Citadel.info(%22Chunk unloading: %22 + chunk.toString());%0A
     

Remove chunk log spam