Attempt to fix command execution.

This commit is contained in:
MattBDev
2019-10-09 20:43:28 -04:00
parent 183d733825
commit ccd8f2c2a9
10 changed files with 33 additions and 99 deletions

View File

@ -83,7 +83,7 @@ public class FaweBukkit implements IFawe, Listener {
}
if (PaperLib.isPaper() && Settings.IMP.EXPERIMENTAL.DYNAMIC_CHUNK_RENDERING > 1) {
new RenderListener(plugin);
}
}in
if (Bukkit.getPluginManager().getPlugin("PlotSquared") != null) {
try {
WEManager.IMP.managers.add(new PlotSquaredFeature());

View File

@ -31,7 +31,6 @@ import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.extension.platform.AbstractPlayerActor;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.extent.inventory.BlockBag;
import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.math.BlockVector3;
@ -177,15 +176,8 @@ public class BukkitPlayer extends AbstractPlayerActor {
@Override
public void setPosition(Vector3 pos, float pitch, float yaw) {
if (pos instanceof com.sk89q.worldedit.util.Location) {
com.sk89q.worldedit.util.Location loc = (com.sk89q.worldedit.util.Location) pos;
Extent extent = loc.getExtent();
if (extent instanceof World) {
org.bukkit.World world = Bukkit.getWorld(((World) extent).getName());
player.teleport(new Location(world, pos.getX(), pos.getY(), pos.getZ(), yaw, pitch));
}
}
player.teleport(new Location(player.getWorld(), pos.getX(), pos.getY(), pos.getZ(), yaw, pitch));
player.teleport(new Location(player.getWorld(), pos.getX(), pos.getY(),
pos.getZ(), yaw, pitch));
}
@Override
@ -264,7 +256,7 @@ public class BukkitPlayer extends AbstractPlayerActor {
@Override
public boolean isAllowedToFly() {
return player.getAllowFlight();
}
}
@Override
public void setFlying(boolean flying) {

View File

@ -224,13 +224,6 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
}
}
// // Register 1.13 Material ids with LegacyMapper
// LegacyMapper legacyMapper = LegacyMapper.getInstance();
// for (Material m : Material.values()) {
// if (!m.isLegacy() && m.isBlock()) {
// legacyMapper.register(m.getId(), 0, BukkitAdapter.adapt(m).getDefaultState());
// }
// }
// Enable metrics
new Metrics(this);
PaperLib.suggestPaper(this);
@ -465,7 +458,7 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
// code of WorldEdit expects it
String[] split = new String[args.length + 1];
System.arraycopy(args, 0, split, 1, args.length);
split[0] = commandLabel;
split[0] = "/" + commandLabel;
CommandEvent event = new CommandEvent(wrapCommandSender(sender), Joiner.on(" ").join(split));
getWorldEdit().getEventBus().post(event);