mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fixed bug with Chunklets not being reloaded on /reload
This commit is contained in:
parent
09721518b0
commit
4407ed0a6f
@ -29,6 +29,7 @@ Version 1.3.09
|
||||
= Fixed bug with Tree Feller changing durability before checking for axe splintering
|
||||
= Fixed bug with Repair Mastery permission due to typo
|
||||
= Fixed bug with repairing items that use metadata
|
||||
= Fixed bug with Chunklets not being reloaded on /reload
|
||||
! API methods can now only be used in a static way
|
||||
! Arrows shot from a bow having the Infitity enchantment can no longer be retrieved
|
||||
! Changed Spout settings to be in their own config file (spout.yml)
|
||||
|
@ -9,6 +9,7 @@ import java.util.List;
|
||||
import net.shatteredlands.shatt.backup.ZipLibrary;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
@ -223,6 +224,10 @@ public class mcMMO extends JavaPlugin {
|
||||
|
||||
// Get our ChunkletManager
|
||||
placeStore = ChunkletManagerFactory.getChunkletManager();
|
||||
|
||||
for (World world : getServer().getWorlds()) {
|
||||
placeStore.loadWorld(world);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,6 +36,13 @@ public interface ChunkletManager {
|
||||
*/
|
||||
public void unloadWorld(World world);
|
||||
|
||||
/**
|
||||
* Load all ChunkletStores from all loaded chunks from this world into memory
|
||||
*
|
||||
* @param world World to load
|
||||
*/
|
||||
public void loadWorld(World world);
|
||||
|
||||
/**
|
||||
* Save all ChunkletStores
|
||||
*/
|
||||
|
@ -11,6 +11,7 @@ import java.io.StreamCorruptedException;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
@ -92,6 +93,13 @@ public class HashChunkletManager implements ChunkletManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadWorld(World world) {
|
||||
for(Chunk chunk : world.getLoadedChunks()) {
|
||||
this.chunkLoaded(chunk.getX(), chunk.getZ(), world);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAll() {
|
||||
for(World world : Bukkit.getWorlds()) {
|
||||
|
@ -29,6 +29,11 @@ public class NullChunkletManager implements ChunkletManager {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadWorld(World world) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAll() {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user