From 2936823d03b7a1b62cbe5e024b416193211cd593 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Fri, 18 May 2012 21:44:25 -0400 Subject: [PATCH] NullChunkletManager --- .../util/blockmeta/NullChunkletManager.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/main/java/com/gmail/nossr50/util/blockmeta/NullChunkletManager.java 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; + } +}