Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Removed BukkitWorld caching.
Dieser Commit ist enthalten in:
Ursprung
c1c5a66f1f
Commit
f5be1eb44b
@ -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) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren