mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Static Abuse Removal - Various Chunklet classes
This commit is contained in:
parent
f52144fb3e
commit
e1656423c1
@ -1,7 +1,15 @@
|
||||
package com.gmail.nossr50.util.blockmeta;
|
||||
|
||||
public class ChunkletManagerFactory {
|
||||
public static ChunkletManager getChunkletManager() {
|
||||
return new HashChunkletManager();
|
||||
}
|
||||
}
|
||||
//package com.gmail.nossr50.util.blockmeta;
|
||||
//
|
||||
//import com.gmail.nossr50.mcMMO;
|
||||
//
|
||||
//public class ChunkletManagerFactory {
|
||||
// private final mcMMO pluginRef;
|
||||
//
|
||||
// public ChunkletManagerFactory(mcMMO pluginRef) {
|
||||
// this.pluginRef = pluginRef;
|
||||
// }
|
||||
//
|
||||
// public ChunkletManager getChunkletManager() {
|
||||
// return new HashChunkletManager(pluginRef);
|
||||
// }
|
||||
//}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.util.blockmeta;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
@ -7,8 +8,13 @@ import java.io.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class HashChunkletManager implements ChunkletManager {
|
||||
private final mcMMO pluginRef;
|
||||
public HashMap<String, ChunkletStore> store = new HashMap<>();
|
||||
|
||||
public HashChunkletManager(mcMMO pluginRef) {
|
||||
this.pluginRef = pluginRef;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadChunklet(int cx, int cy, int cz, World world) {
|
||||
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||
|
@ -55,7 +55,7 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
|
||||
for (int i = 0; (i < ChunkConversionOptions.getConversionRate()) && (i < this.xDirs.length); i++) {
|
||||
if (this.converters[i] == null) {
|
||||
this.converters[i] = new BlockStoreConversionXDirectory();
|
||||
this.converters[i] = new BlockStoreConversionXDirectory(pluginRef);
|
||||
}
|
||||
|
||||
this.converters[i].start(this.world, this.xDirs[i]);
|
||||
|
@ -33,7 +33,7 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
public void start(org.bukkit.World world, File xDir, File dataDir) {
|
||||
this.world = world;
|
||||
this.scheduler = pluginRef.getServer().getScheduler();
|
||||
this.manager = new HashChunkletManager();
|
||||
this.manager = new HashChunkletManager(pluginRef);
|
||||
this.newManager = (HashChunkManager) pluginRef.getPlaceStore();
|
||||
this.dataDir = dataDir;
|
||||
this.xDir = xDir;
|
||||
|
Loading…
Reference in New Issue
Block a user