mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:08:34 +00:00
@ -67,7 +67,6 @@ import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.util.formatting.component.SubtleFormat;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
@ -217,7 +216,7 @@ public class UtilityCommands {
|
||||
|
||||
BlockVector3 pos = session.getPlacementPosition(actor);
|
||||
int affected = editSession.fillDirection(pos, pattern, radius, depth, direction);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.fill.created", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.fill.created", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -315,7 +314,7 @@ public class UtilityCommands {
|
||||
|
||||
BlockVector3 pos = session.getPlacementPosition(actor);
|
||||
int affected = editSession.fillXZ(pos, pattern, radius, depth, true);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.fillr.created", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.fillr.created", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -336,7 +335,7 @@ public class UtilityCommands {
|
||||
radius = Math.max(0, radius);
|
||||
we.checkMaxRadius(radius);
|
||||
int affected = editSession.drainArea(session.getPlacementPosition(actor), radius, waterlogged, plants);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.drain.drained", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.drain.drained", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -353,7 +352,7 @@ public class UtilityCommands {
|
||||
radius = Math.max(0, radius);
|
||||
we.checkMaxRadius(radius);
|
||||
int affected = editSession.fixLiquid(session.getPlacementPosition(actor), radius, BlockTypes.LAVA);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.fixlava.fixed", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.fixlava.fixed", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -370,7 +369,7 @@ public class UtilityCommands {
|
||||
radius = Math.max(0, radius);
|
||||
we.checkMaxRadius(radius);
|
||||
int affected = editSession.fixLiquid(session.getPlacementPosition(actor), radius, BlockTypes.WATER);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.fixwater.fixed", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.fixwater.fixed", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -391,7 +390,7 @@ public class UtilityCommands {
|
||||
height = height != null ? Math.min((world.getMaxY() + 1), height + 1) : (world.getMaxY() + 1);
|
||||
|
||||
int affected = editSession.removeAbove(session.getPlacementPosition(actor), size, height);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.removeabove.removed", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.removeabove.removed", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -412,7 +411,7 @@ public class UtilityCommands {
|
||||
height = height != null ? Math.min((world.getMaxY() + 1), height + 1) : (world.getMaxY() + 1);
|
||||
|
||||
int affected = editSession.removeBelow(session.getPlacementPosition(actor), size, height);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.removebelow.removed", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.removebelow.removed", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -432,7 +431,7 @@ public class UtilityCommands {
|
||||
we.checkMaxRadius(radius);
|
||||
|
||||
int affected = editSession.removeNear(session.getPlacementPosition(actor), mask, radius);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.removenear.removed", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.removenear.removed", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -463,7 +462,7 @@ public class UtilityCommands {
|
||||
}
|
||||
|
||||
int affected = editSession.replaceBlocks(region, from, to);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.replacenear.replaced", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.replacenear.replaced", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -494,7 +493,7 @@ public class UtilityCommands {
|
||||
|
||||
CylinderRegion region = new CylinderRegion(position, Vector2.at(size, size), position.getBlockY() - height, position.getBlockY() + height);
|
||||
int affected = editSession.simulateSnow(region, stack);
|
||||
actor.printInfo(TranslatableComponent.of(
|
||||
actor.print(Caption.of(
|
||||
"worldedit.snow.created", TextComponent.of(affected)
|
||||
));
|
||||
return affected;
|
||||
@ -521,7 +520,7 @@ public class UtilityCommands {
|
||||
we.checkMaxRadius(size);
|
||||
|
||||
int affected = editSession.thaw(session.getPlacementPosition(actor), size, height);
|
||||
actor.printInfo(TranslatableComponent.of(
|
||||
actor.print(Caption.of(
|
||||
"worldedit.thaw.removed", TextComponent.of(affected)
|
||||
));
|
||||
return affected;
|
||||
@ -553,7 +552,7 @@ public class UtilityCommands {
|
||||
final int affected = editSession.green(
|
||||
session.getPlacementPosition(actor), size, height, onlyNormalDirt
|
||||
);
|
||||
actor.printInfo(TranslatableComponent.of(
|
||||
actor.print(Caption.of(
|
||||
"worldedit.green.changed", TextComponent.of(affected)
|
||||
));
|
||||
return affected;
|
||||
@ -578,7 +577,7 @@ public class UtilityCommands {
|
||||
|
||||
Mask mask = new BlockTypeMask(editSession, BlockTypes.FIRE);
|
||||
int affected = editSession.removeNear(session.getPlacementPosition(actor), mask, size);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.extinguish.removed", TextComponent.of(affected)));
|
||||
actor.print(Caption.of("worldedit.extinguish.removed", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
||||
@ -615,7 +614,7 @@ public class UtilityCommands {
|
||||
if (radius == null) {
|
||||
radius = config.butcherDefaultRadius;
|
||||
} else if (radius < -1) {
|
||||
actor.printError(TranslatableComponent.of("worldedit.butcher.explain-all"));
|
||||
actor.print(Caption.of("worldedit.butcher.explain-all"));
|
||||
return 0;
|
||||
} else if (radius == -1) {
|
||||
if (config.butcherMaxRadius != -1) {
|
||||
@ -639,7 +638,7 @@ public class UtilityCommands {
|
||||
|
||||
int killed = killMatchingEntities(radius, actor, flags::createFunction);
|
||||
|
||||
actor.printInfo(TranslatableComponent.of(
|
||||
actor.print(Caption.of(
|
||||
"worldedit.butcher.killed",
|
||||
TextComponent.of(killed),
|
||||
TextComponent.of(radius)
|
||||
@ -661,12 +660,12 @@ public class UtilityCommands {
|
||||
@Arg(desc = "The radius of the cuboid to remove from")
|
||||
int radius) throws WorldEditException {
|
||||
if (radius < -1) {
|
||||
actor.printError(TranslatableComponent.of("worldedit.remove.explain-all"));
|
||||
actor.print(Caption.of("worldedit.remove.explain-all"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int removed = killMatchingEntities(radius, actor, remover::createFunction);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.remove.removed", TextComponent.of(removed)));
|
||||
actor.print(Caption.of("worldedit.remove.removed", TextComponent.of(removed)));
|
||||
return removed;
|
||||
}
|
||||
|
||||
@ -716,7 +715,7 @@ public class UtilityCommands {
|
||||
try {
|
||||
expression = Expression.compile(String.join(" ", input));
|
||||
} catch (ExpressionException e) {
|
||||
actor.printError(TranslatableComponent.of(
|
||||
actor.print(Caption.of(
|
||||
"worldedit.calc.invalid.with-error",
|
||||
TextComponent.of(String.join(" ", input)),
|
||||
TextComponent.of(e.getMessage())
|
||||
@ -755,7 +754,7 @@ public class UtilityCommands {
|
||||
@CommandPermissions(value = "fawe.confirm", queued = false)
|
||||
public void confirm(Player player) throws WorldEditException {
|
||||
if (!player.confirm()) {
|
||||
player.print(TranslatableComponent.of("fawe.worldedit.utility.nothing.confirmed"));
|
||||
player.print(Caption.of("fawe.worldedit.utility.nothing.confirmed"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -819,7 +818,7 @@ public class UtilityCommands {
|
||||
getFiles(dir, actor, args, formatName, playerFolder, fileList::add);
|
||||
|
||||
if (fileList.isEmpty()) {
|
||||
actor.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"));
|
||||
actor.print(Caption.of("fawe.worldedit.schematic.schematic.none"));
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user