diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/NullChunkletManager.java b/src/main/java/com/gmail/nossr50/util/blockmeta/NullChunkletManager.java new file mode 100644 index 000000000..15e391a45 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/NullChunkletManager.java @@ -0,0 +1,76 @@ +package com.gmail.nossr50.util.blockmeta; + +import org.bukkit.World; +import org.bukkit.block.Block; + +/** + * A ChunkletManager implementation that does nothing and returns false for all checks. + * + * Useful for turning off Chunklets without actually doing much work + */ +public class NullChunkletManager implements ChunkletManager { + @Override + public void chunkLoaded(int cx, int cz, World world) { + return; + } + + @Override + public void chunkUnloaded(int cx, int cz, World world) { + return; + } + + @Override + public void saveWorld(World world) { + return; + } + + @Override + public void unloadWorld(World world) { + return; + } + + @Override + public void saveAll() { + return; + } + + @Override + public void unloadAll() { + return; + } + + @Override + public boolean isTrue(int x, int y, int z, World world) { + return false; + } + + @Override + public boolean isTrue(Block block) { + return false; + } + + @Override + public void setTrue(int x, int y, int z, World world) { + return; + } + + @Override + public void setTrue(Block block) { + return; + } + + @Override + public void setFalse(int x, int y, int z, World world) { + return; + } + + @Override + public void setFalse(Block block) { + return; + } + + @Override + public void cleanUp() { + return; + } +}