mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:24:03 +00:00
Various minor changes
This commit is contained in:
@@ -42,6 +42,8 @@ import com.boydti.fawe.util.MathMan;
|
||||
import com.boydti.fawe.util.TaskManager;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.event.extent.EditSessionEvent;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.Watchdog;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.ChangeSetExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
@@ -195,8 +197,6 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
|
||||
@SuppressWarnings("ProtectedField")
|
||||
protected final World world;
|
||||
private final String worldName;
|
||||
private boolean wrapped;
|
||||
private final FaweLimit originalLimit;
|
||||
private final FaweLimit limit;
|
||||
private final Player player;
|
||||
@@ -212,6 +212,8 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
private Extent bypassAll;
|
||||
|
||||
private final int maxY;
|
||||
private final List<WatchdogTickingExtent> watchdogExtents = new ArrayList<>(2);
|
||||
|
||||
|
||||
@Deprecated
|
||||
public EditSession(EventBus bus, World world, @Nullable Player player,
|
||||
@@ -247,8 +249,6 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
public EditSession(EditSessionBuilder builder) {
|
||||
super(builder.compile().getExtent());
|
||||
this.world = builder.getWorld();
|
||||
this.worldName = world.getName();
|
||||
this.wrapped = builder.isWrapped();
|
||||
this.bypassHistory = builder.getBypassHistory();
|
||||
this.bypassAll = builder.getBypassAll();
|
||||
this.originalLimit = builder.getLimit();
|
||||
@@ -317,11 +317,9 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
public Extent getBypassAll() {
|
||||
return bypassAll;
|
||||
}
|
||||
|
||||
public Extent getBypassHistory() {
|
||||
return bypassHistory;
|
||||
}
|
||||
private final List<WatchdogTickingExtent> watchdogExtents = new ArrayList<>(2);
|
||||
|
||||
public void setExtent(AbstractDelegateExtent extent) {
|
||||
new ExtentTraverser(this).setNext(extent);
|
||||
@@ -483,7 +481,6 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
|
||||
public void addTransform(ResettableExtent transform) {
|
||||
checkNotNull(transform);
|
||||
wrapped = true;
|
||||
transform.setExtent(getExtent());
|
||||
new ExtentTraverser(this).setNext(transform);
|
||||
}
|
||||
|
@@ -449,70 +449,7 @@ public class SchematicCommands {
|
||||
actor.printInfo(TextComponent.of(builder.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@Command(
|
||||
name = "show",
|
||||
desc = "Show a schematic",
|
||||
descFooter = "List all schematics in the schematics directory\n" +
|
||||
" -f <format> restricts by format\n"
|
||||
)
|
||||
@CommandPermissions("worldedit.schematic.show")
|
||||
public void show(Player player, InjectedValueAccess args, @Switch(name='f', desc = "") String formatName) {
|
||||
FawePlayer fp = FawePlayer.wrap(player);
|
||||
if (args.argsLength() == 0) {
|
||||
if (fp.getSession().getVirtualWorld() != null) fp.setVirtualWorld(null);
|
||||
else {
|
||||
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/" + Commands.getAlias(SchematicCommands.class, "schematic") + " " + getCommand().aliases()[0] + " " + getCommand().usage()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
LocalConfiguration config = worldEdit.getConfiguration();
|
||||
File dir = worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
try {
|
||||
SchemVis visExtent = new SchemVis(fp);
|
||||
LongAdder count = new LongAdder();
|
||||
UtilityCommands.getFiles(dir, player, args, 0, Character.MAX_VALUE, formatName, Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS, file -> {
|
||||
if (file.isFile()) {
|
||||
try {
|
||||
visExtent.add(file);
|
||||
count.add(1);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
long total = count.longValue();
|
||||
if (total == 0) {
|
||||
if (args.getJoinedStrings(0).toLowerCase().startsWith("all")) {
|
||||
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"))
|
||||
} else {
|
||||
String joined = args.getJoinedStrings(0);
|
||||
String cmd = "/" + Commands.getAlias(SchematicCommands.class, "schematic") + " " + getCommand().aliases()[0] + " all " + joined;
|
||||
player.print(TranslatableComponent.of("fawe.worldedit.help.help.suggest" , joined, cmd));
|
||||
}
|
||||
return;
|
||||
}
|
||||
visExtent.bind();
|
||||
visExtent.update();
|
||||
|
||||
String cmdPrefix = "/" + (config.noDoubleSlash ? "" : "/");
|
||||
String cmdShow = Commands.getAlias(ClipboardCommands.class, "schematic") + " " + Commands.getAlias(ClipboardCommands.class, "show");
|
||||
fp.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.show" , count.longValue(), args.getJoinedStrings(0), cmdShow));
|
||||
|
||||
if (fp.getSession().getExistingClipboard() != null) {
|
||||
String cmd = cmdPrefix + Commands.getAlias(ClipboardCommands.class, "clearclipboard");
|
||||
fp.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.prompt.clear" , cmd));
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
fp.setVirtualWorld(null);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@Command(
|
||||
name = "list",
|
||||
aliases = {"all", "ls"},
|
||||
|
Reference in New Issue
Block a user