geforkt von Mirrors/FastAsyncWorldEdit
Update for SpoutAPI scheduler and lighting changes
Dieser Commit ist enthalten in:
Ursprung
b22921ffa6
Commit
379189f224
@ -31,6 +31,7 @@ import org.spout.api.Engine;
|
|||||||
import org.spout.api.geo.World;
|
import org.spout.api.geo.World;
|
||||||
import org.spout.api.material.Material;
|
import org.spout.api.material.Material;
|
||||||
import org.spout.api.material.MaterialRegistry;
|
import org.spout.api.material.MaterialRegistry;
|
||||||
|
import org.spout.api.scheduler.TaskPriority;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -74,7 +75,7 @@ public class SpoutServerInterface extends ServerInterface {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int schedule(long delay, long period, Runnable task) {
|
public int schedule(long delay, long period, Runnable task) {
|
||||||
return game.getScheduler().scheduleSyncRepeatingTask(plugin, task, delay, period);
|
return game.getScheduler().scheduleSyncRepeatingTask(plugin, task, delay * 50, period * 50, TaskPriority.NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -192,7 +192,7 @@ public class SpoutWorld extends LocalWorld {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getBlockLightLevel(Vector pt) {
|
public int getBlockLightLevel(Vector pt) {
|
||||||
return world.getBlockMaterial(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).getLightLevel();
|
return world.getBlockLight(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +39,7 @@ import org.spout.api.event.server.PreCommandEvent;
|
|||||||
import org.spout.api.event.world.WorldLoadEvent;
|
import org.spout.api.event.world.WorldLoadEvent;
|
||||||
import org.spout.api.generator.biome.BiomeGenerator;
|
import org.spout.api.generator.biome.BiomeGenerator;
|
||||||
import org.spout.api.geo.discrete.Point;
|
import org.spout.api.geo.discrete.Point;
|
||||||
|
import org.spout.api.scheduler.TaskPriority;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@ -140,7 +141,7 @@ public class WorldEditListener implements Listener {
|
|||||||
public void run() {
|
public void run() {
|
||||||
ignoreLeftClickAir = false;
|
ignoreLeftClickAir = false;
|
||||||
}
|
}
|
||||||
}, 2);
|
}, 100, TaskPriority.NORMAL);
|
||||||
|
|
||||||
if (taskId != -1) {
|
if (taskId != -1) {
|
||||||
ignoreLeftClickAir = true;
|
ignoreLeftClickAir = true;
|
||||||
|
@ -36,6 +36,7 @@ import org.spout.api.command.CommandSource;
|
|||||||
import org.spout.api.geo.World;
|
import org.spout.api.geo.World;
|
||||||
import org.spout.api.player.Player;
|
import org.spout.api.player.Player;
|
||||||
import org.spout.api.plugin.CommonPlugin;
|
import org.spout.api.plugin.CommonPlugin;
|
||||||
|
import org.spout.api.scheduler.TaskPriority;
|
||||||
import org.spout.api.util.Named;
|
import org.spout.api.util.Named;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -100,7 +101,7 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
|||||||
registerEvents();
|
registerEvents();
|
||||||
|
|
||||||
getGame().getScheduler().scheduleAsyncRepeatingTask(this,
|
getGame().getScheduler().scheduleAsyncRepeatingTask(this,
|
||||||
new SessionTimer(controller, getGame()), 120, 120);
|
new SessionTimer(controller, getGame()), 6 * 1000, 6 * 1000, TaskPriority.LOWEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren