Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-16 16:10:07 +01:00
resolve some simple todos
Dieser Commit ist enthalten in:
Ursprung
4608c8e485
Commit
20ff8711c0
@ -3,6 +3,7 @@ package com.fastasyncworldedit.bukkit;
|
||||
import com.fastasyncworldedit.bukkit.adapter.BukkitQueueHandler;
|
||||
import com.fastasyncworldedit.bukkit.adapter.NMSAdapter;
|
||||
import com.fastasyncworldedit.bukkit.listener.BrushListener;
|
||||
import com.fastasyncworldedit.bukkit.listener.ChunkListener9;
|
||||
import com.fastasyncworldedit.bukkit.listener.RenderListener;
|
||||
import com.fastasyncworldedit.bukkit.regions.GriefDefenderFeature;
|
||||
import com.fastasyncworldedit.bukkit.regions.GriefPreventionFeature;
|
||||
@ -93,10 +94,9 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
//PlotSquared support is limited to Spigot/Paper as of 02/20/2020
|
||||
TaskManager.taskManager().taskGlobal(this::setupPlotSquared);
|
||||
|
||||
// TODO (folia) moved out of task below??
|
||||
Bukkit.getPluginManager().registerEvents(FaweBukkit.this, FaweBukkit.this.plugin);
|
||||
// Registered delayed Event Listeners
|
||||
/*TaskManager.taskManager().task(() -> {
|
||||
TaskManager.taskManager().taskGlobal(() -> {
|
||||
// Fix for ProtocolSupport
|
||||
Settings.settings().PROTOCOL_SUPPORT_FIX =
|
||||
Bukkit.getPluginManager().isPluginEnabled("ProtocolSupport");
|
||||
@ -105,7 +105,7 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
|
||||
// The tick limiter
|
||||
new ChunkListener9();
|
||||
});*/
|
||||
});
|
||||
|
||||
// Warn if small-edits are enabled with extended world heights
|
||||
if (version.isEqualOrHigherThan(MinecraftVersion.CAVES_18) && Settings.settings().HISTORY.SMALL_EDITS) {
|
||||
|
@ -76,8 +76,7 @@ public class FaweDelegateRegionManager {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (whenDone != null) {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(whenDone, new com.sk89q.worldedit.util.Location(world, ));
|
||||
com.plotsquared.core.util.task.TaskManager.runTask(whenDone);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,8 +203,7 @@ public class FaweDelegateRegionManager {
|
||||
RelightMode.valueOf(com.fastasyncworldedit.core.configuration.Settings.settings().LIGHTING.MODE)
|
||||
);
|
||||
if (whenDone != null) {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(whenDone);
|
||||
com.plotsquared.core.util.task.TaskManager.runTask(whenDone);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -274,8 +272,7 @@ public class FaweDelegateRegionManager {
|
||||
RelightMode.valueOf(com.fastasyncworldedit.core.configuration.Settings.settings().LIGHTING.MODE)
|
||||
);
|
||||
if (whenDone != null) {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(whenDone);
|
||||
com.plotsquared.core.util.task.TaskManager.runTask(whenDone);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -304,8 +301,7 @@ public class FaweDelegateRegionManager {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (whenDone != null) {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(whenDone);
|
||||
com.plotsquared.core.util.task.TaskManager.runTask(whenDone);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -358,8 +354,7 @@ public class FaweDelegateRegionManager {
|
||||
}
|
||||
}
|
||||
if (whenDone != null) {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(whenDone);
|
||||
com.plotsquared.core.util.task.TaskManager.runTask(whenDone);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
@ -383,8 +378,7 @@ public class FaweDelegateRegionManager {
|
||||
editSession.flushQueue();
|
||||
}
|
||||
if (whenDone != null) {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(whenDone);
|
||||
com.plotsquared.core.util.task.TaskManager.runTask(whenDone);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -147,7 +147,7 @@ public class BukkitWorld extends AbstractWorld {
|
||||
public List<com.sk89q.worldedit.entity.Entity> getEntities(Region region) {
|
||||
World world = getWorld();
|
||||
|
||||
List<Entity> ents = List.of(); // TODO (folia) TaskManager.taskManager().sync(world::getEntities);
|
||||
List<Entity> ents = TaskManager.taskManager().syncGlobal(world::getEntities);
|
||||
List<com.sk89q.worldedit.entity.Entity> entities = new ArrayList<>();
|
||||
for (Entity ent : ents) {
|
||||
if (region.contains(BukkitAdapter.asBlockVector(ent.getLocation()))) {
|
||||
@ -161,7 +161,7 @@ public class BukkitWorld extends AbstractWorld {
|
||||
public List<com.sk89q.worldedit.entity.Entity> getEntities() {
|
||||
List<com.sk89q.worldedit.entity.Entity> list = new ArrayList<>();
|
||||
|
||||
List<Entity> ents = List.of(); // TaskManager.taskManager().sync(getWorld()::getEntities);
|
||||
List<Entity> ents = TaskManager.taskManager().syncGlobal(getWorld()::getEntities);
|
||||
for (Entity entity : ents) {
|
||||
list.add(BukkitAdapter.adapt(entity));
|
||||
}
|
||||
|
@ -92,16 +92,13 @@ public class DefaultProgressTracker implements BiConsumer<DefaultProgressTracker
|
||||
}
|
||||
|
||||
private void done() {
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(this::doneTask);
|
||||
doneTask();
|
||||
}
|
||||
|
||||
private long lastTick = 0;
|
||||
|
||||
private void send() {
|
||||
// Run on main thread
|
||||
// TODO (folia)
|
||||
// TaskManager.taskManager().task(this::sendTask);
|
||||
sendTask();
|
||||
}
|
||||
|
||||
public void doneTask() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren