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