Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 13:00:05 +01:00
Fix issues with 94619e3f
. Closes WORLDEDIT-2221.
Dieser Commit ist enthalten in:
Ursprung
b2ff0fb2a2
Commit
aadfc30fbb
@ -19,6 +19,8 @@
|
||||
|
||||
package com.sk89q.worldedit.commands;
|
||||
|
||||
import static com.sk89q.minecraft.util.commands.Logging.LogMode.PLACEMENT;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
@ -30,11 +32,19 @@ import com.sk89q.minecraft.util.commands.CommandPermissions;
|
||||
import com.sk89q.minecraft.util.commands.CommandsManager;
|
||||
import com.sk89q.minecraft.util.commands.Console;
|
||||
import com.sk89q.minecraft.util.commands.Logging;
|
||||
import static com.sk89q.minecraft.util.commands.Logging.LogMode.*;
|
||||
import com.sk89q.worldedit.*;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.EntityType;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalPlayer;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.LocalWorld.KillFlags;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.patterns.*;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
import com.sk89q.worldedit.patterns.SingleBlockPattern;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
|
||||
@ -368,19 +378,15 @@ public class UtilityCommands {
|
||||
|
||||
LocalConfiguration config = we.getConfiguration();
|
||||
|
||||
final int radius;
|
||||
int radius = config.butcherDefaultRadius;
|
||||
|
||||
if (args.argsLength() > 0) {
|
||||
if (args.getString(0).equals("all")) {
|
||||
radius = -1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
radius = Math.max(1, args.getInteger(0));
|
||||
}
|
||||
}
|
||||
else{
|
||||
radius = config.butcherDefaultRadius;
|
||||
}
|
||||
|
||||
FlagContainer flags = new FlagContainer(player);
|
||||
flags.or(KillFlags.FRIENDLY , args.hasFlag('f'));
|
||||
@ -400,10 +406,11 @@ public class UtilityCommands {
|
||||
}
|
||||
}
|
||||
|
||||
if (radius < 0)
|
||||
if (radius < 0) {
|
||||
player.print("Killed " + killed + " mobs.");
|
||||
else
|
||||
player.print("Killed " + killed + " mobs in a radius of "+radius+".");
|
||||
} else {
|
||||
player.print("Killed " + killed + " mobs in a radius of " + radius + ".");
|
||||
}
|
||||
}
|
||||
|
||||
public class FlagContainer {
|
||||
@ -496,6 +503,7 @@ public class UtilityCommands {
|
||||
|
||||
if (args.argsLength() == 0) {
|
||||
SortedSet<String> commands = new TreeSet<String>(new Comparator<String>() {
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
final int ret = o1.replaceAll("/", "").compareToIgnoreCase(o2.replaceAll("/", ""));
|
||||
if (ret == 0) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren