mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Hidden config and use of NullChunkletManager
ChunkletManagerFactory now produces NullChunkletManagers if Chunklets are disabeld in the hidden.yml
This commit is contained in:
@ -1,8 +1,15 @@
|
||||
package com.gmail.nossr50.util.blockmeta;
|
||||
|
||||
import com.gmail.nossr50.config.HiddenConfig;
|
||||
|
||||
public class ChunkletManagerFactory {
|
||||
public static ChunkletManager getChunkletManager() {
|
||||
// TODO: Add in loading from config what type of manager we want.
|
||||
return new HashChunkletManager();
|
||||
HiddenConfig hConfig = HiddenConfig.getInstance();
|
||||
|
||||
if(hConfig.getChunkletsEnabled()) {
|
||||
return new HashChunkletManager();
|
||||
} else {
|
||||
return new NullChunkletManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user