geforkt von Mirrors/FastAsyncWorldEdit
Revert "got paste -e working, still throws IllegalStateException but idc"
This reverts commit 54008be1a2
.
Dieser Commit ist enthalten in:
Ursprung
b96d45e4e6
Commit
6fc68da2ce
@ -61,7 +61,6 @@ import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.Chest;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.inventory.DoubleChestInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
@ -123,7 +122,7 @@ public class BukkitWorld extends AbstractWorld {
|
||||
@Override
|
||||
public com.sk89q.worldedit.entity.Entity createEntity(com.sk89q.worldedit.util.Location location, BaseEntity entity) {
|
||||
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
|
||||
if (adapter != null && Fawe.isMainThread()) {
|
||||
if (adapter != null) {
|
||||
try {
|
||||
Entity createdEntity = adapter.createEntity(BukkitAdapter.adapt(getWorld(), location), entity);
|
||||
if (createdEntity != null) {
|
||||
@ -139,16 +138,6 @@ public class BukkitWorld extends AbstractWorld {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
} else if (adapter != null && !Fawe.isMainThread()){
|
||||
Future<com.sk89q.worldedit.entity.Entity> future = Fawe.get().getQueueHandler().sync((Supplier<com.sk89q.worldedit.entity.Entity>)() -> this.createEntity(location, entity));
|
||||
while (!future.isDone()) {
|
||||
((CraftWorld)worldRef.get()).getHandle().getChunkProvider().runTasks();
|
||||
}
|
||||
try {
|
||||
return future.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public interface IDelegateBukkitImplAdapter<T> extends BukkitImplAdapter<T> {
|
||||
default Entity createEntity(Location location, BaseEntity state) {
|
||||
return getParent().createEntity(location, state);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
default Map<String, ? extends Property<?>> getProperties(BlockType blockType) {
|
||||
return getParent().getProperties(blockType);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren