Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 13:00:05 +01:00
Updated for SpoutAPI changes
Dieser Commit ist enthalten in:
Ursprung
43a54a7ee0
Commit
d81090c5d9
@ -23,7 +23,7 @@ package com.sk89q.worldedit.spout;
|
||||
|
||||
import com.sk89q.worldedit.SessionCheck;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import org.spout.api.Game;
|
||||
import org.spout.api.Engine;
|
||||
import org.spout.api.player.Player;
|
||||
|
||||
/**
|
||||
@ -36,7 +36,7 @@ public class SessionTimer implements Runnable {
|
||||
private WorldEdit worldEdit;
|
||||
private SessionCheck checker;
|
||||
|
||||
public SessionTimer(WorldEdit worldEdit, final Game game) {
|
||||
public SessionTimer(WorldEdit worldEdit, final Engine game) {
|
||||
this.worldEdit = worldEdit;
|
||||
this.checker = new SessionCheck() {
|
||||
public boolean isOnlinePlayer(String name) {
|
||||
|
@ -27,8 +27,7 @@ import com.sk89q.minecraft.util.commands.CommandsManager;
|
||||
import com.sk89q.worldedit.LocalPlayer;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.ServerInterface;
|
||||
import org.spout.api.Game;
|
||||
import org.spout.api.Spout;
|
||||
import org.spout.api.Engine;
|
||||
import org.spout.api.geo.World;
|
||||
import org.spout.api.material.Material;
|
||||
import org.spout.api.material.MaterialRegistry;
|
||||
@ -39,12 +38,12 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class SpoutServerInterface extends ServerInterface {
|
||||
public Game game;
|
||||
public Engine game;
|
||||
public WorldEditPlugin plugin;
|
||||
private final SpoutRawCommandExecutor executor;
|
||||
private SpoutBiomeTypes biomes;
|
||||
|
||||
public SpoutServerInterface(WorldEditPlugin plugin, Game game) {
|
||||
public SpoutServerInterface(WorldEditPlugin plugin, Engine game) {
|
||||
this.plugin = plugin;
|
||||
this.game = game;
|
||||
this.biomes = new SpoutBiomeTypes();
|
||||
@ -93,7 +92,7 @@ public class SpoutServerInterface extends ServerInterface {
|
||||
@Override
|
||||
public void onCommandRegistration(List<Command> commands, CommandsManager<LocalPlayer> manager) {
|
||||
for (Command command : commands) {
|
||||
org.spout.api.command.Command spoutCommand = Spout.getGame().getRootCommand().addSubCommand(plugin, command.aliases()[0])
|
||||
org.spout.api.command.Command spoutCommand = game.getRootCommand().addSubCommand(plugin, command.aliases()[0])
|
||||
.addAlias(command.aliases()).setRawExecutor(executor).
|
||||
setUsage(command.usage()).setHelp(command.desc());
|
||||
Method cmdMethod = manager.getMethods().get(null).get(command.aliases()[0]);
|
||||
|
@ -27,7 +27,7 @@ import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Location;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldVector;
|
||||
import org.spout.api.Game;
|
||||
import org.spout.api.Engine;
|
||||
import org.spout.api.entity.Entity;
|
||||
import org.spout.api.geo.World;
|
||||
import org.spout.api.geo.cuboid.Block;
|
||||
@ -96,7 +96,7 @@ public class SpoutUtil {
|
||||
);
|
||||
}
|
||||
|
||||
public static Player matchSinglePlayer(Game game, String name) {
|
||||
public static Player matchSinglePlayer(Engine game, String name) {
|
||||
return game.getPlayer(name, false);
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ public class WorldEditListener implements Listener {
|
||||
}
|
||||
|
||||
if (!event.isAir() && !ignoreLeftClickAir) {
|
||||
final int taskId = Spout.getGame().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
final int taskId = Spout.getEngine().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
ignoreLeftClickAir = false;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren