Removed BukkitWorld caching.

This commit is contained in:
sk89q 2012-10-19 15:44:24 -07:00
parent c1c5a66f1f
commit f5be1eb44b

View File

@ -23,11 +23,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.sk89q.worldedit.bukkit.entity.BukkitEntity;
import com.sk89q.worldedit.bukkit.entity.BukkitExpOrb;
import com.sk89q.worldedit.bukkit.entity.BukkitItem;
import com.sk89q.worldedit.bukkit.entity.BukkitPainting;
import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Entity;
@ -35,8 +32,6 @@ import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Item;
import org.bukkit.entity.Painting;
import org.bukkit.entity.Player;
import org.bukkit.Server;
import org.bukkit.World;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.BlockWorldVector;
@ -44,6 +39,10 @@ import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Location;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldVector;
import com.sk89q.worldedit.bukkit.entity.BukkitEntity;
import com.sk89q.worldedit.bukkit.entity.BukkitExpOrb;
import com.sk89q.worldedit.bukkit.entity.BukkitItem;
import com.sk89q.worldedit.bukkit.entity.BukkitPainting;
public class BukkitUtil {
private BukkitUtil() {
@ -52,12 +51,7 @@ public class BukkitUtil {
private static final Map<World, LocalWorld> wlw = new HashMap<World, LocalWorld>();
public static LocalWorld getLocalWorld(World w) {
LocalWorld lw = wlw.get(w);
if (lw == null) {
lw = new BukkitWorld(w);
wlw.put(w, lw);
}
return lw;
return new BukkitWorld(w);
}
public static BlockVector toVector(Block block) {