Revert "got paste -e working, still throws IllegalStateException but idc"

This reverts commit 54008be1a2.
Dieser Commit ist enthalten in:
Aurora 2020-07-01 14:52:50 +02:00
Ursprung b96d45e4e6
Commit 6fc68da2ce
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 89839F67B53656AD
2 geänderte Dateien mit 2 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -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;
}