3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 19:10:07 +01:00

Removed BukkitWorld caching.

Dieser Commit ist enthalten in:
sk89q 2012-10-19 15:44:24 -07:00
Ursprung c1c5a66f1f
Commit f5be1eb44b

Datei anzeigen

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