mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-27 05:00:08 +08:00
Removed BukkitWorld caching.
This commit is contained in:
parent
c1c5a66f1f
commit
f5be1eb44b
@ -23,11 +23,8 @@
|
|||||||
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.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.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 @@ private 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user