3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00
Dieser Commit ist enthalten in:
Jesse Boyd 2019-11-21 19:56:10 +00:00
Ursprung 6f32783e52
Commit 1341e38a90
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
84 geänderte Dateien mit 930 neuen und 286 gelöschten Zeilen

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.bukkit;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.FaweCommand;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitBlockCommandSender;

Datei anzeigen

@ -77,7 +77,7 @@ public class BukkitBlockCommandSender extends AbstractNonPlayerActor implements
@Override
public void print(String msg) {
for (String part : msg.split("\n")) {
print(TextComponent.of(part, TextColor.LIGHT_PURPLE));
print(TextComponent.of(part, TextColor.GRAY));
}
}

Datei anzeigen

@ -21,6 +21,8 @@ package com.sk89q.worldedit.bukkit;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.bukkit.FaweBukkit;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.RunnableVal;
import com.boydti.fawe.util.TaskManager;
@ -40,11 +42,17 @@ import com.sk89q.worldedit.session.SessionKey;
import com.sk89q.worldedit.util.HandSide;
import com.sk89q.worldedit.util.formatting.WorldEditText;
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.adapter.bukkit.TextAdapter;
import com.sk89q.worldedit.util.formatting.text.serializer.gson.GsonComponentSerializer;
import com.sk89q.worldedit.util.formatting.text.serializer.legacy.LegacyComponentSerializer;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.gamemode.GameMode;
@ -167,28 +175,25 @@ public class BukkitPlayer extends AbstractPlayerActor {
@Override
public void print(String msg) {
for (String part : msg.split("\n")) {
player.sendMessage("\u00A7d" + part);
}
print(LegacyComponentSerializer.legacy().deserialize("&7" + msg, '&'));
}
@Override
public void printDebug(String msg) {
for (String part : msg.split("\n")) {
player.sendMessage("\u00A77" + part);
}
print(LegacyComponentSerializer.legacy().deserialize("&3" + msg, '&'));
}
@Override
public void printError(String msg) {
for (String part : msg.split("\n")) {
player.sendMessage("\u00A7c" + part);
}
print(LegacyComponentSerializer.legacy().deserialize("&c" + msg, '&'));
}
@Override
public void print(Component component) {
TextAdapter.sendComponent(player, WorldEditText.format(component, getLocale()));
Component prefix = TranslatableComponent.of("fawe.prefix");
component = TextComponent.builder().append(prefix).append(component).build();
component = BBC.color(component, getLocale());
TextAdapter.sendComponent(player, component);
}
@Override
@ -366,10 +371,10 @@ public class BukkitPlayer extends AbstractPlayerActor {
}
@Override
public void sendTitle(String title, String sub) {
player.sendTitle(ChatColor.GOLD + title, ChatColor.GOLD + sub, 0, 70, 20);
Bukkit.getServer().dispatchCommand(player, "title " + getName() + " subtitle [{\"text\":\"" + sub + "\",\"color\":\"gold\"}]");
Bukkit.getServer().dispatchCommand(player, "title " + getName() + " title [{\"text\":\"" + title + "\",\"color\":\"gold\"}]");
public void sendTitle(Component title, Component sub) {
String titleStr = WorldEditText.reduceToText(title, getLocale());
String subStr = WorldEditText.reduceToText(sub, getLocale());
player.sendTitle(titleStr, subStr, 0, 70, 20);
}
@Override

Datei anzeigen

@ -2,6 +2,7 @@ package com.boydti.fawe;
import com.boydti.fawe.beta.implementation.queue.QueueHandler;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.brush.visualization.VisualQueue;
import com.boydti.fawe.regions.general.integrations.plotquared.PlotSquaredFeature;

Datei anzeigen

@ -2,6 +2,8 @@ package com.boydti.fawe;
import com.boydti.fawe.beta.IQueueExtent;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.RegionWrapper;
import com.boydti.fawe.object.changeset.DiskStorageHistory;
@ -232,7 +234,7 @@ public class FaweAPI {
* @param reason
* @see EditSession#getRegionExtent() To get the FaweExtent for an EditSession
*/
public static void cancelEdit(Extent extent, BBC reason) {
public static void cancelEdit(Extent extent, Component reason) {
try {
WEManager.IMP.cancelEdit(extent, new FaweException(reason));
} catch (WorldEditException ignore) {

Datei anzeigen

@ -5,6 +5,7 @@ import static org.slf4j.LoggerFactory.getLogger;
import com.boydti.fawe.beta.Trimable;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.collection.BitArray4096;
import com.boydti.fawe.object.collection.CleanableThreadLocal;
@ -199,15 +200,15 @@ public enum FaweCache implements Trimable {
*/
public static final FaweChunkLoadException CHUNK = new FaweChunkLoadException();
public static final FaweBlockBagException BLOCK_BAG = new FaweBlockBagException();
public static final FaweException MANUAL = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MANUAL);
public static final FaweException NO_REGION = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_NO_REGION);
public static final FaweException OUTSIDE_REGION = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION);
public static final FaweException MAX_CHECKS = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MAX_CHECKS);
public static final FaweException MAX_CHANGES = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MAX_CHANGES);
public static final FaweException LOW_MEMORY = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_LOW_MEMORY);
public static final FaweException MAX_ENTITIES = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MAX_ENTITIES);
public static final FaweException MAX_TILES = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MAX_TILES);
public static final FaweException MAX_ITERATIONS = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MAX_ITERATIONS);
public static final FaweException MANUAL = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.manual"));
public static final FaweException NO_REGION = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.no.region"));
public static final FaweException OUTSIDE_REGION = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.outside.region"));
public static final FaweException MAX_CHECKS = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.checks"));
public static final FaweException MAX_CHANGES = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.changes"));
public static final FaweException LOW_MEMORY = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.low.memory"));
public static final FaweException MAX_ENTITIES = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.entities"));
public static final FaweException MAX_TILES = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.tiles"));
public static final FaweException MAX_ITERATIONS = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.iterations"));
/*
thread cache

Datei anzeigen

@ -52,7 +52,7 @@ public class AnvilCommands {
// boolean copy = false;
// if (FaweAPI.getWorld(folder) != null) {
// if (!force) {
// BBC.WORLD_IS_LOADED.send(player);
// player.print(TranslatableComponent.of("fawe.worldedit.anvil.world.is.loaded"))
// return null;
// }
// copy = true;
@ -80,7 +80,7 @@ public class AnvilCommands {
// @Deprecated
// public static <G, T extends MCAFilter<G>> T runWithSelection(Player player, EditSession editSession, Region selection, T filter) {
// if (!(selection instanceof CuboidRegion)) {
// BBC.NO_REGION.send(player);
// player.print(TranslatableComponent.of("fawe.error.no.region"))
// return null;
// }
// CuboidRegion cuboid = (CuboidRegion) selection;
@ -131,7 +131,7 @@ public class AnvilCommands {
// final FaweBlockMatcher matchTo = FaweBlockMatcher.setBlocks(worldEdit.getBlocks(player, to, true));
// ReplaceSimpleFilter filter = new ReplaceSimpleFilter(matchFrom, matchTo);
// ReplaceSimpleFilter result = runWithWorld(player, folder, filter, true);
// if (result != null) player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// if (result != null) player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
}
@Command(
@ -148,7 +148,7 @@ public class AnvilCommands {
// RemapFilter filter = new RemapFilter(from, to);
// RemapFilter result = runWithWorld(player, folder, filter, true);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -167,7 +167,7 @@ public class AnvilCommands {
// DeleteUninhabitedFilter filter = new DeleteUninhabitedFilter(fileDurationMillis, inhabitedTicks, fileDurationMillis); TODO NOT IMPLEMENTED
// DeleteUninhabitedFilter result = runWithWorld(player, folder, filter, true);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -190,7 +190,7 @@ public class AnvilCommands {
// }
// DeleteUnclaimedFilter result = runWithWorld(player, folder, filter, true);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -212,7 +212,7 @@ public class AnvilCommands {
// }
// DeleteUnclaimedFilter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -229,7 +229,7 @@ public class AnvilCommands {
// DeleteOldFilter filter = new DeleteOldFilter(duration);
// DeleteOldFilter result = runWithWorld(player, folder, filter, true);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -249,7 +249,7 @@ public class AnvilCommands {
// MCAQueue queue = new MCAQueue(defaultQueue);
// PlotTrimFilter result = queue.filterWorld(filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -262,7 +262,7 @@ public class AnvilCommands {
// DeleteBiomeFilterSimple filter = new DeleteBiomeFilterSimple(biome); TODO NOT IMPLEMENTED
// DeleteBiomeFilterSimple result = runWithWorld(player, folder, filter, true, unsafe);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -275,7 +275,7 @@ public class AnvilCommands {
// TrimAirFilter filter = new TrimAirFilter(); TODO NOT IMPLEMENTED
// TrimAirFilter result = runWithWorld(player, folder, filter, true, unsafe);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -289,7 +289,7 @@ public class AnvilCommands {
// DebugFixP2Roads filter = new DebugFixP2Roads(); TODO NOT IMPLEMENTED
// DebugFixP2Roads result = runWithWorld(player, folder, filter, true, true);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -319,7 +319,7 @@ public class AnvilCommands {
// filter = new ReplacePatternFilter(matchFrom, to);
// }
// MCAFilterCounter result = runWithWorld(player, folder, filter, true);
// if (result != null) player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// if (result != null) player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
}
//
@ -341,7 +341,7 @@ public class AnvilCommands {
// filter = counter;
// }
// MCAFilterCounter result = runWithWorld(player, folder, filter, true);
// if (result != null) player.print(BBC.SELECTION_COUNT.format(result.getTotal()));
// if (result != null) player.print(TranslatableComponent.of("fawe.worldedit.selection.selection.count", (result.getTotal())));
}
@Command(
@ -393,7 +393,7 @@ public class AnvilCommands {
// };
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -415,7 +415,7 @@ public class AnvilCommands {
// filter = counter;
// }
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) player.print(BBC.SELECTION_COUNT.format(result.getTotal()));
// if (result != null) player.print(TranslatableComponent.of("fawe.worldedit.selection.selection.count", (result.getTotal())));
}
//
@ -514,7 +514,7 @@ public class AnvilCommands {
// ReplaceSimpleFilter filter = new ReplaceSimpleFilter(matchFrom, matchTo);
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -546,7 +546,7 @@ public class AnvilCommands {
// }
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -560,7 +560,7 @@ public class AnvilCommands {
// MCAFilterCounter filter = new SetPatternFilter(to); TODO NOT IMPLEMENTED
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -578,7 +578,7 @@ public class AnvilCommands {
// RemoveLayerFilter filter = new RemoveLayerFilter(minY, maxY, id);
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
// if (result != null) {
// player.print(BBC.VISITOR_BLOCK.format(result.getTotal()));
// player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block", (result.getTotal())));
// }
}
@ -590,7 +590,7 @@ public class AnvilCommands {
@CommandPermissions("worldedit.anvil.copychunks")
public void copy(Player player, LocalSession session, EditSession editSession, @Selection Region selection) throws WorldEditException {
// if (!(selection instanceof CuboidRegion)) { TODO NOT IMPLEMENTED
// BBC.NO_REGION.send(player);
// player.print(TranslatableComponent.of("fawe.error.no.region"))
// return;
// }
// CuboidRegion cuboid = (CuboidRegion) selection;
@ -601,7 +601,7 @@ public class AnvilCommands {
// MCAClipboard clipboard = new MCAClipboard(queue, cuboid, origin);
// FawePlayer fp = FawePlayer.wrap(player);
// fp.setMeta(FawePlayer.METADATA_KEYS.ANVIL_CLIPBOARD, clipboard);
// BBC.COMMAND_COPY.send(player, selection.getArea());
// player.print(TranslatableComponent.of("fawe.worldedit.copy.command.copy" , selection.getArea()));
}
@Command(
@ -638,6 +638,6 @@ public class AnvilCommands {
// pasteQueue.pasteRegion(copyQueue, copyRegion, offset, iAnvilHistory);
// } catch (IOException e) { throw new RuntimeException(e); }
// });
// BBC.COMMAND_PASTE.send(player, player.getPosition().toBlockVector());
// player.print(TranslatableComponent.of("fawe.worldedit.paste.command.paste" , player.getPosition().toBlockVector()));
}
}

Datei anzeigen

@ -8,6 +8,7 @@ import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweAPI;
import com.boydti.fawe.beta.implementation.filter.block.SingleFilterBlock;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.RunnableVal;
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
@ -949,7 +950,7 @@ public class CFICommands {
JsonObject data1 = obj.get("data").getAsJsonObject();
String link = data1.get("link").getAsString();
URL url = new URL(link);
BBC.DOWNLOAD_LINK.send(player, url);
player.print(TranslatableComponent.of("fawe.web.download.link" , url));
}
@Command(

Datei anzeigen

@ -3,6 +3,7 @@ package com.boydti.fawe.command;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweAPI;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweCommand;
import com.boydti.fawe.object.RegionWrapper;
@ -34,11 +35,11 @@ public class Rollback extends FaweCommand {
}
Player player = (Player) actor;
if (!Settings.IMP.HISTORY.USE_DATABASE) {
BBC.SETTING_DISABLE.send(player, "history.use-database (Import with /frb #import )");
player.print(TranslatableComponent.of("fawe.error.setting.disable" , "history.use-database (Import with /frb #import )"));
return false;
}
if (args.length != 3) {
BBC.COMMAND_SYNTAX.send(player, "/frb u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb u:<uuid> r:<radius> t:<time>"));
return false;
}
switch (args[0]) {
@ -46,13 +47,13 @@ public class Rollback extends FaweCommand {
case "info":
case "undo":
case "revert":
BBC.COMMAND_SYNTAX.send(player, "/frb u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb u:<uuid> r:<radius> t:<time>"));
return false;
}
if (args.length < 1) {
BBC.COMMAND_SYNTAX.send(player, "/frb <info|undo> u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb <info|undo> u:<uuid> r:<radius> t:<time>"));
return false;
}
World world = player.getWorld();
@ -60,7 +61,7 @@ public class Rollback extends FaweCommand {
case "i":
case "info":
if (args.length < 2) {
BBC.COMMAND_SYNTAX.send(player, "/frb <info|undo> u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb <info|undo> u:<uuid> r:<radius> t:<time>"));
return false;
}
player.deleteMeta(Player.METADATA_KEYS.ROLLBACK);
@ -101,13 +102,13 @@ public class Rollback extends FaweCommand {
case "undo":
case "revert":
if (!player.hasPermission("fawe.rollback.perform")) {
BBC.NO_PERM.send(player, "fawe.rollback.perform");
player.print(TranslatableComponent.of("fawe.error.no.perm", "fawe.rollback.perform"));
return false;
}
final List<DiskStorageHistory> edits = player.getMeta(Player.METADATA_KEYS.ROLLBACK);
player.deleteMeta(Player.METADATA_KEYS.ROLLBACK);
if (edits == null) {
BBC.COMMAND_SYNTAX.send(player, "/frb info u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb info u:<uuid> r:<radius> t:<time>"));
return false;
}
for (DiskStorageHistory edit : edits) {
@ -119,7 +120,7 @@ public class Rollback extends FaweCommand {
}
player.print("Rollback complete!");
default:
BBC.COMMAND_SYNTAX.send(player, "/frb info u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb info u:<uuid> r:<radius> t:<time>"));
return false;
}
return true;
@ -132,7 +133,7 @@ public class Rollback extends FaweCommand {
for (String arg : args) {
String[] split = arg.split(":");
if (split.length != 2) {
BBC.COMMAND_SYNTAX.send(player, "/frb <info|undo> u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb <info|undo> u:<uuid> r:<radius> t:<time>"));
return;
}
switch (split[0].toLowerCase()) {
@ -165,7 +166,7 @@ public class Rollback extends FaweCommand {
time = MainUtil.timeToSec(split[1]) * 1000;
break;
default:
BBC.COMMAND_SYNTAX.send(player, "/frb <info|undo> u:<uuid> r:<radius> t:<time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb <info|undo> u:<uuid> r:<radius> t:<time>"));
return;
}
}

Datei anzeigen

@ -4,12 +4,21 @@ import static org.slf4j.LoggerFactory.getLogger;
import com.boydti.fawe.configuration.MemorySection;
import com.boydti.fawe.configuration.file.YamlConfiguration;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.util.formatting.WorldEditText;
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.serializer.legacy.LegacyComponentSerializer;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ThreadLocalRandom;
@ -20,6 +29,7 @@ public enum BBC {
* Things to note about this class:
* Can use multiple arguments %s, %s1, %s2, %s3 etc
*/
PREFIX("&4&lFAWE&7: ", "Info"),
FILE_DELETED("%s0 has been deleted.", "Info"),
SCHEMATIC_PASTING("&7The schematic is pasting. This cannot be undone.", "Info"),
LIGHTING_PROPAGATE_SELECTION("Lighting has been propogated in %s0 chunks. (Note: To remove light use //removelight)", "Info"),
@ -136,7 +146,6 @@ public enum BBC {
BRUSH_TRANSFORM("Brush transform set", "WorldEdit.Brush"),
BRUSH_MATERIAL("Brush material set", "WorldEdit.Brush"),
ROLLBACK_ELEMENT("Undoing %s0", "WorldEdit.Rollback"),
TOOL_INSPECT("Inspect tool bound to %s0.", "WorldEdit.Tool"),
@ -309,6 +318,8 @@ public enum BBC {
SCRIPTING_CS("Use /cs with a script name first.", "WorldEdit.Scripting"),
SCRIPTING_ERROR("An error occured while executing a craft script", "WorldEdit.Scripting"),
TIP_SEL_LIST("Tip: See the different selection modes with //sel list", "Tips"),
TIP_SELECT_CONNECTED("Tip: Select all connected blocks with //sel fuzzy", "Tips"),
TIP_SET_POS1("Tip: Use pos1 as a pattern with //set pos1", "Tips"),
@ -377,7 +388,7 @@ public enum BBC {
*/
BBC(String defaultMessage, String category) {
this.defaultMessage = defaultMessage;
this.translatedMessage = defaultMessage;
setTranslated(defaultMessage);
this.category = category.toLowerCase(Locale.ROOT);
}
@ -428,7 +439,7 @@ public enum BBC {
yml.set(caption.category + "." + caption.name().toLowerCase(Locale.ROOT), value);
}
captions.add(caption);
caption.translatedMessage = (String) value;
caption.setTranslated((String) value);
} else {
toRemove.add(key);
}
@ -451,6 +462,10 @@ public enum BBC {
}
}
private void setTranslated(String msg) {
this.translatedMessage = msg;
}
@Override
public String toString() {
return s();
@ -509,4 +524,47 @@ public enum BBC {
}
}
/**
* Colorize a component with legacy color codes
* @param parent
* @param locale
* @return Component
*/
public static Component color(Component component, Locale locale) {
return color(WorldEditText.format(component, locale));
}
public static Component color(Component parent) {
if (parent instanceof TextComponent) {
TextComponent text = (TextComponent) parent;
String content = text.content();
if (content.indexOf('&') != -1) {
Component legacy = LegacyComponentSerializer.legacy().deserialize(content, '&');
legacy = legacy.style(parent.style());
if (!parent.children().isEmpty()) {
parent = TextComponent.builder().append(legacy).append(parent.children()).build();
} else {
parent = legacy;
}
}
}
List<Component> children = parent.children();
if (!children.isEmpty()) {
for (int i = 0; i < children.size(); i++) {
Component child = children.get(i);
Component coloredChild = color(child);
if (coloredChild != child) {
if (!(children instanceof ArrayList)) {
children = new ArrayList<>(children);
}
children.set(i, coloredChild);
}
}
if (children instanceof ArrayList) {
parent = parent.children(children);
}
}
return parent;
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.util.TaskManager;
import com.sk89q.worldedit.extension.platform.Actor;
@ -30,7 +31,7 @@ public abstract class FaweCommand<T> {
TaskManager.IMP.async(() -> execute(player, args));
} else {
if (!player.runAction(() -> execute(player, args), true, true)) {
player.printError(BBC.WORLDEDIT_COMMAND_LIMIT.s());
player.printError(TranslatableComponent.of("fawe.info.worldedit.command.limit"));
return true;
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.VisualExtent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
@ -35,14 +36,14 @@ public class CatenaryBrush implements Brush, ResettableTool {
if (pos1 == null || pos2.equals(pos1)) {
if (!visual) {
pos1 = pos2;
BBC.BRUSH_LINE_PRIMARY.send(editSession.getPlayer(), pos2);
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.primary", pos2));
}
return;
}
if (this.vertex == null) {
vertex = getVertex(pos1.toVector3(), pos2.toVector3(), slack);
if (this.direction) {
BBC.BRUSH_CATENARY_DIRECTION.send(editSession.getPlayer(), 2);
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.catenary.direction", 2));
return;
}
} else if (this.direction) {
@ -60,7 +61,7 @@ public class CatenaryBrush implements Brush, ResettableTool {
e.printStackTrace();
}
if (!visual) {
BBC.BRUSH_LINE_SECONDARY.send(editSession.getPlayer());
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.secondary"));
if (!select) {
pos1 = null;
return;

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.VisualExtent;
import com.boydti.fawe.object.clipboard.ResizableClipboardBuilder;
import com.boydti.fawe.object.function.NullRegionFunction;
@ -42,7 +43,7 @@ public class CopyPastaBrush implements Brush, ResettableTool {
@Override
public boolean reset() {
session.setClipboard(null);
player.print(BBC.BRUSH_RESET.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.reset"));
return true;
}
@ -87,7 +88,7 @@ public class CopyPastaBrush implements Brush, ResettableTool {
ClipboardHolder holder = new ClipboardHolder(newClipboard);
session.setClipboard(holder);
int blocks = builder.size();
BBC.COMMAND_COPY.send(player, blocks);
player.print(TranslatableComponent.of("fawe.worldedit.copy.command.copy" , blocks));
} else {
AffineTransform transform = null;
if (randomRotate) {

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
import com.boydti.fawe.beta.IQueueExtent;
import com.boydti.fawe.object.brush.heightmap.HeightMap;
@ -46,7 +47,7 @@ public class HeightBrush implements Brush {
try {
heightMap = ScalableHeightMap.fromPNG(stream);
} catch (IOException e) {
throw new FaweException(BBC.BRUSH_HEIGHT_INVALID);
throw new FaweException(TranslatableComponent.of("fawe.worldedit.brush.brush.height.invalid"));
}
} else if (clipboard != null) {
heightMap = ScalableHeightMap.fromClipboard(clipboard);

Datei anzeigen

@ -2,6 +2,7 @@ package com.boydti.fawe.object.brush;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.database.DBHandler;
import com.boydti.fawe.database.RollbackDatabase;
@ -20,6 +21,7 @@ import com.sk89q.worldedit.extension.platform.Platform;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockState;
import java.io.IOException;
@ -58,11 +60,11 @@ public class InspectBrush extends BrushTool implements DoubleActionTraceTool {
public boolean perform(final Player player, LocalSession session, boolean rightClick) {
if (!session.isToolControlEnabled() || !player.hasPermission("worldedit.tool.inspect")) {
player.print(BBC.NO_PERM.format("worldedit.tool.inspect"));
player.print(TranslatableComponent.of("", "worldedit.tool.inspect"));
return false;
}
if (!Settings.IMP.HISTORY.USE_DATABASE) {
player.print(BBC.SETTING_DISABLE.format("history.use-database (Import with /frb #import )"));
player.print(TranslatableComponent.of("fawe.error.setting.disable", ("history.use-database (Import with /frb #import )")));
return false;
}
BlockVector3 target = getTarget(player, rightClick).toBlockPoint();
@ -89,7 +91,7 @@ public class InspectBrush extends BrushTool implements DoubleActionTraceTool {
int index = value.getIndex();
long age = System.currentTimeMillis() - value.getBDFile().lastModified();
String ageFormatted = MainUtil.secToTime(age / 1000);
BBC.TOOL_INSPECT_INFO.send(player, name, BlockState.getFromOrdinal(from).getAsString(), BlockState.getFromOrdinal(to).getAsString(), ageFormatted);
player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.inspect.info" , name, BlockState.getFromOrdinal(from).getAsString(), BlockState.getFromOrdinal(to).getAsString(), ageFormatted));
count.incrementAndGet();
return;
}
@ -100,7 +102,7 @@ public class InspectBrush extends BrushTool implements DoubleActionTraceTool {
}, new Runnable() {
@Override
public void run() {
BBC.TOOL_INSPECT_INFO_FOOTER.send(player, count);
player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.inspect.info.footer" , count));
}
}, false, false);
return true;

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.VisualExtent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
@ -25,13 +26,13 @@ public class LineBrush implements Brush, ResettableTool {
if (pos1 == null) {
if (!visual) {
pos1 = position;
BBC.BRUSH_LINE_PRIMARY.send(editSession.getPlayer(), position);
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.primary", position));
}
return;
}
editSession.drawLine(pattern, pos1, position, size, !shell, flat);
if (!visual) {
BBC.BRUSH_LINE_SECONDARY.send(editSession.getPlayer());
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.secondary"));
if (!select) {
pos1 = null;
} else {

Datei anzeigen

@ -2,6 +2,7 @@ package com.boydti.fawe.object.brush;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.VisualExtent;
import com.boydti.fawe.object.exception.FaweException;
import com.boydti.fawe.object.mask.IdMask;
@ -94,13 +95,13 @@ public class SplineBrush implements Brush, ResettableTool {
points.add(position);
}
this.positionSets.add(points);
player.print(BBC.BRUSH_SPLINE_PRIMARY_2.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.primary.2"));
if (!visualization) {
return;
}
}
if (positionSets.size() < 2) {
player.print(BBC.BRUSH_SPLINE_SECONDARY_ERROR.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary.error"));
return;
}
List<Vector3> centroids = new ArrayList<>();
@ -132,7 +133,7 @@ public class SplineBrush implements Brush, ResettableTool {
}
editSession.drawSpline(pattern, currentSpline, 0, 0, 0, 10, 0, true);
}
player.print(BBC.BRUSH_SPLINE_SECONDARY.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary"));
if (visualization) {
numSplines = originalSize;
positionSets.remove(positionSets.size() - 1);

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.VisualExtent;
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
import com.boydti.fawe.util.MathMan;
@ -39,7 +40,7 @@ public class SurfaceSpline implements Brush {
if (max == -1) return;
// pos.mutY(max);
path.add(BlockVector3.at(pos.getBlockX(), max, pos.getBlockZ()));
editSession.getPlayer().print(BBC.BRUSH_SPLINE_PRIMARY_2.s());
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.primary.2"));
if (!vis) return;
}
LocalBlockVectorSet vset = new LocalBlockVectorSet();
@ -93,6 +94,6 @@ public class SurfaceSpline implements Brush {
editSession.setBlocks(newSet, pattern);
if (!vis) path.clear();
}
editSession.getPlayer().print(BBC.BRUSH_SPLINE_SECONDARY.s());
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary"));
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush.scroll;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
@ -46,7 +47,7 @@ public abstract class Scroll implements ScrollTool {
return null;
case CLIPBOARD:
if (arguments.size() != 2) {
if (message) BBC.COMMAND_SYNTAX.send(player, "clipboard [file]");
if (message) player.print(TranslatableComponent.of("fawe.error.command.syntax" , "clipboard [file]"));
return null;
}
String filename = arguments.get(1);
@ -61,7 +62,7 @@ public abstract class Scroll implements ScrollTool {
}
case MASK:
if (arguments.size() < 2) {
if (message) BBC.COMMAND_SYNTAX.send(player, "mask [mask 1] [mask 2] [mask 3]...");
if (message) player.print(TranslatableComponent.of("fawe.error.command.syntax" , "mask [mask 1] [mask 2] [mask 3]..."));
return null;
}
Mask[] masks = new Mask[arguments.size() - 1];
@ -72,7 +73,7 @@ public abstract class Scroll implements ScrollTool {
return (new ScrollMask(tool, masks));
case PATTERN:
if (arguments.size() < 2) {
if (message) BBC.COMMAND_SYNTAX.send(player, "pattern [pattern 1] [pattern 2] [pattern 3]...");
if (message) player.print(TranslatableComponent.of("fawe.error.command.syntax" , "pattern [pattern 1] [pattern 2] [pattern 3]..."));
return null;
}
Pattern[] patterns = new Pattern[arguments.size() - 1];

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.brush.sweep;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.ResettableTool;
import com.boydti.fawe.object.brush.visualization.VisualExtent;
import com.boydti.fawe.util.MathMan;
@ -53,13 +54,13 @@ public class SweepBrush implements Brush, ResettableTool {
return;
}
if (newPos) {
player.print(BBC.BRUSH_SPLINE_PRIMARY_2.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.primary.2"));
positions.add(position);
return;
}
if (positions.size() < 2) {
player.printError(BBC.BRUSH_SPLINE_SECONDARY_ERROR.s());
player.printError(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary.error"));
return;
}
@ -122,7 +123,7 @@ public class SweepBrush implements Brush, ResettableTool {
break;
}
}
player.print(BBC.BRUSH_SPLINE_SECONDARY.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary"));
reset();
}

Datei anzeigen

@ -1,9 +1,10 @@
package com.boydti.fawe.object.exception;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
public class FaweBlockBagException extends FaweException {
public FaweBlockBagException() {
super(BBC.WORLDEDIT_SOME_FAILS_BLOCKBAG);
super(TranslatableComponent.of("fawe.error.worldedit.some.fails.blockbag"));
}
}
}

Datei anzeigen

@ -1,9 +1,10 @@
package com.boydti.fawe.object.exception;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
public class FaweChunkLoadException extends FaweException {
public FaweChunkLoadException() {
super(BBC.WORLDEDIT_FAILED_LOAD_CHUNK);
super(TranslatableComponent.of("fawe.cancel.worldedit.failed.load.chunk"));
}
}
}

Datei anzeigen

@ -1,8 +1,15 @@
package com.boydti.fawe.object.exception;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.util.formatting.WorldEditText;
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.extent.Extent;
import java.util.Locale;
public class FaweException extends RuntimeException {
// DEBUG
public static final FaweException _enableQueue;
@ -18,18 +25,22 @@ public class FaweException extends RuntimeException {
}
}
private final String message;
private final Component message;
public FaweException(String reason) {
this.message = reason;
this(TextComponent.of(reason));
}
public FaweException(BBC reason) {
this(reason.format());
public FaweException(Component reason) {
this.message = reason;
}
@Override
public String getMessage() {
return WorldEditText.reduceToText(message, Locale.ROOT);
}
public Component getComponent() {
return message;
}

Datei anzeigen

@ -9,6 +9,7 @@ import com.boydti.fawe.util.WEManager;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.extent.PassthroughExtent;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
public class MemoryCheckingExtent extends PassthroughExtent {
private final Player player;
@ -22,9 +23,9 @@ public class MemoryCheckingExtent extends PassthroughExtent {
public Extent getExtent() {
if (MemUtil.isMemoryLimited()) {
if (this.player != null) {
player.print(BBC.WORLDEDIT_CANCEL_REASON.format(BBC.WORLDEDIT_CANCEL_REASON_LOW_MEMORY.s()));
player.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason", (TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.low.memory"))));
if (Permission.hasPermission(this.player, "worldedit.fast")) {
BBC.WORLDEDIT_OOM_ADMIN.send(this.player);
this.player.print(TranslatableComponent.of("fawe.info.worldedit.oom.admin"));
}
}
WEManager.IMP.cancelEdit(this, FaweCache.LOW_MEMORY);

Datei anzeigen

@ -6,6 +6,8 @@ import com.boydti.fawe.beta.IChunk;
import com.boydti.fawe.beta.IChunkGet;
import com.boydti.fawe.beta.IChunkSet;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.exception.FaweException;
import com.sk89q.worldedit.MaxChangedBlocksException;
@ -44,7 +46,7 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor {
*
* @param extent the extent
*/
public NullExtent(Extent extent, BBC failReason) {
public NullExtent(Extent extent, Component failReason) {
this(extent, new FaweException(failReason));
}

Datei anzeigen

@ -1,6 +1,8 @@
package com.boydti.fawe.object.progress;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
public class ChatProgressTracker extends DefaultProgressTracker {
public ChatProgressTracker(Player player) {
@ -9,7 +11,7 @@ public class ChatProgressTracker extends DefaultProgressTracker {
}
@Override
public void sendTile(String title, String sub) {
getPlayer().print(title + sub);
public void sendTile(Component title, Component sub) {
getPlayer().print(TextComponent.builder().append(title).append("\n").append(sub).build());
}
}

Datei anzeigen

@ -1,6 +1,9 @@
package com.boydti.fawe.object.progress;
import com.boydti.fawe.config.BBC;
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.boydti.fawe.config.Settings;
import com.boydti.fawe.util.StringMan;
import com.boydti.fawe.util.TaskManager;
@ -101,7 +104,7 @@ public class DefaultProgressTracker implements BiConsumer<DefaultProgressTracker
}
public void doneTask() {
sendTile("", BBC.PROGRESS_FINISHED.s());
sendTile(TextComponent.empty(), TranslatableComponent.of("fawe.progress.progress.finished"));
}
public void sendTask() {
@ -112,10 +115,10 @@ public class DefaultProgressTracker implements BiConsumer<DefaultProgressTracker
String speedStr = StringMan.padRight("" + speed, 3);
String percent = StringMan.padRight("" + (amountDispatch != 0 ? (amountDispatch * 100) / totalQueue : 0), 3);
int remaining = speed != 0 ? amountQueue / speed : -1;
sendTile("", BBC.PROGRESS_MESSAGE.format(queue, dispatch, percent, StringMan.padLeft("" + speed, 3), StringMan.padLeft("" + remaining, 3)));
sendTile(TextComponent.empty(), TranslatableComponent.of("fawe.progress.progress.message", queue, dispatch, percent, StringMan.padLeft("" + speed, 3), StringMan.padLeft("" + remaining, 3)));
}
public void sendTile(String title, String sub) {
public void sendTile(Component title, Component sub) {
player.sendTitle(title, sub);
}
}

Datei anzeigen

@ -1,6 +1,7 @@
package com.boydti.fawe.object.regions.selector;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.regions.FuzzyRegion;
import com.boydti.fawe.util.EditSessionBuilder;
import com.boydti.fawe.util.ExtentTraverser;
@ -88,13 +89,13 @@ public class FuzzyRegionSelector extends PassthroughExtent implements RegionSele
@Override
public void explainPrimarySelection(Actor actor, LocalSession session, BlockVector3 position) {
int size = this.region.getArea();
BBC.SELECTOR_FUZZY_POS1.send(player, position, "(" + region.getArea() + ")");
player.print(TranslatableComponent.of("fawe.worldedit.selector.selector.fuzzy.pos1", position, "(" + region.getArea() + ")"));
}
@Override
public void explainSecondarySelection(Actor actor, LocalSession session, BlockVector3 position) {
int size = this.region.getArea();
BBC.SELECTOR_FUZZY_POS2.send(player, position, "(" + region.getArea() + ")");
player.print(TranslatableComponent.of("fawe.worldedit.selector.selector.fuzzy.pos2", position, "(" + region.getArea() + ")"));
}
@Override

Datei anzeigen

@ -5,6 +5,7 @@
//import com.boydti.fawe.beta.IChunk;
//import com.boydti.fawe.beta.IQueueExtent;
//import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
//import com.boydti.fawe.object.*;
//import com.boydti.fawe.object.brush.visualization.ImmutableVirtualWorld;
//import com.boydti.fawe.object.clipboard.LazyClipboardHolder;
@ -129,7 +130,7 @@
// URI uri = file.toURI();
// ClipboardFormat format = ClipboardFormats.findByFile(file);
// format.hold(player, uri, new FileInputStream(file));
// BBC.SCHEMATIC_LOADED.send(player, filename);
// player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.loaded" , filename));
// session.setVirtualWorld(null);
// return;
// }
@ -157,7 +158,7 @@
// session.setClipboard(null);
// }
// select.put(clicked, false);
// BBC.CLIPBOARD_CLEARED.send(player);
// player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.cleared"))
// }
// } else {
// // Add it
@ -165,7 +166,7 @@
// MultiClipboardHolder multi = new MultiClipboardHolder(URI.create(""), new LazyClipboardHolder(uri, source, format, null));
// session.addClipboard(multi);
// select.put(clicked, true);
// BBC.SCHEMATIC_LOADED.send(player, file.getName());
// player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.loaded" , file.getName()));
// }
// }
// // Resend relevant chunks

Datei anzeigen

@ -1,12 +1,18 @@
package com.boydti.fawe.object.visitor;
import com.boydti.fawe.config.BBC;
import com.google.common.collect.Lists;
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.boydti.fawe.object.IntegerTrio;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.function.operation.RunContext;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashSet;
@ -139,9 +145,11 @@ public abstract class DFSVisitor implements Operation {
}
@Override
public void addStatusMessages(List<String> messages) {
messages.add(BBC.VISITOR_BLOCK.format(getAffected()));
public Iterable<Component> getStatusMessages() {
return Lists.newArrayList(TranslatableComponent.of(
"fawe.worldedit.visitor.visitor.block",
TextComponent.of(getAffected())
).color(TextColor.GRAY));
}
public int getAffected() {

Datei anzeigen

@ -10,6 +10,7 @@ import com.boydti.fawe.beta.IQueueExtent;
import com.boydti.fawe.beta.implementation.processors.LimitProcessor;
import com.boydti.fawe.beta.implementation.queue.ParallelQueueExtent;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.logging.LoggingChangeSet;
import com.boydti.fawe.logging.rollback.RollbackOptimizedHistory;
@ -306,7 +307,7 @@ public class EditSessionBuilder {
if (checkMemory) {
if (MemUtil.isMemoryLimitedSlow()) {
if (Permission.hasPermission(player, "worldedit.fast")) {
player.print(BBC.WORLDEDIT_OOM_ADMIN.s());
player.print(TranslatableComponent.of("fawe.info.worldedit.oom.admin"));
}
throw FaweCache.LOW_MEMORY;
}

Datei anzeigen

@ -5,6 +5,10 @@ import static org.slf4j.LoggerFactory.getLogger;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.util.formatting.WorldEditText;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweInputStream;
import com.boydti.fawe.object.FaweOutputStream;
@ -61,6 +65,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Scanner;
import java.util.UUID;
@ -831,7 +836,8 @@ public class MainUtil {
long age = now - file.lastModified();
if (age > timeDiff) {
pool.submit(file::delete);
if (printDebug) BBC.FILE_DELETED.send((Player)null, file);
Component msg = WorldEditText.format(TranslatableComponent.of("fawe.info.file.deleted"), Locale.ROOT);
if (printDebug) Fawe.debug(msg);
}
});
pool.shutdown();

Datei anzeigen

@ -21,6 +21,7 @@ package com.sk89q.worldedit;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.RegionWrapper;
@ -700,7 +701,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
}
}
BBC.WORLDEDIT_SOME_FAILS_BLOCKBAG.send(player, str.toString());
player.print(TranslatableComponent.of("fawe.error.worldedit.some.fails.blockbag", str.toString()));
}
}
return Collections.emptyMap();
@ -1020,11 +1021,11 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
FaweLimit used = getLimitUsed();
if (used.MAX_FAILS > 0) {
if (used.MAX_CHANGES > 0 || used.MAX_ENTITIES > 0) {
BBC.WORLDEDIT_SOME_FAILS.send(player, used.MAX_FAILS);
player.print(TranslatableComponent.of("fawe.error.worldedit.some.fails", used.MAX_FAILS));
} else if (new ExtentTraverser<>(getExtent()).findAndGet(FaweRegionExtent.class) != null){
player.printError(BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_REGION.s());
player.printError(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.outside.region"));
} else {
player.printError(BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_LEVEL.s());
player.printError(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.outside.level"));
}
}
// Reset limit

Datei anzeigen

@ -61,12 +61,12 @@ import org.enginehub.piston.part.SubCommandPart;
@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class)
public class ApplyBrushCommands {
private static final CommandArgument REGION_FACTORY = arg(TranslatableComponent.of("shape"), TranslatableComponent.of("worldedit.brush.apply.shape"))
private static final CommandArgument REGION_FACTORY = arg(TranslatableComponent.of("shape") , TranslatableComponent.of("worldedit.brush.apply.shape"))
.defaultsTo(ImmutableList.of())
.ofTypes(ImmutableList.of(Key.of(RegionFactory.class)))
.build();
private static final CommandArgument RADIUS = arg(TranslatableComponent.of("radius"), TranslatableComponent.of("worldedit.brush.apply.radius"))
private static final CommandArgument RADIUS = arg(TranslatableComponent.of("radius") , TranslatableComponent.of("worldedit.brush.apply.radius"))
.defaultsTo(ImmutableList.of("5"))
.ofTypes(ImmutableList.of(Key.of(double.class)))
.build();
@ -85,7 +85,7 @@ public class ApplyBrushCommands {
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.apply")));
builder.addParts(REGION_FACTORY, RADIUS);
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type"), TranslatableComponent.of("worldedit.brush.apply.type"))
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type") , TranslatableComponent.of("worldedit.brush.apply.type"))
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
.required()
.build());

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
@ -205,7 +206,8 @@ public class BiomeCommands {
TextComponent.of(visitor.getAffected())
));
if (!player.hasPermission("fawe.tips")) {
BBC.TIP_BIOME_PATTERN.or(BBC.TIP_BIOME_MASK).send(player);
System.out.println("TODO FIXME tips");
// TranslatableComponent.of("fawe.tips.tip.biome.pattern").or(TranslatableComponent.of("fawe.tips.tip.biome.mask")).send(player);
}
}

Datei anzeigen

@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.brush.BlendBall;
@ -272,7 +273,7 @@ public class BrushCommands {
@Arg(desc = "The radius to sample for blending", def = "25")
Expression radius) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
player.print(BBC.BRUSH_SPLINE.format(radius));
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline", (radius)));
set(context,
new SplineBrush(player))
.setSize(radius)
@ -290,7 +291,7 @@ public class BrushCommands {
@CommandPermissions("worldedit.brush.sweep")
public void sweepBrush(Player player, InjectedValueAccess context,
@Arg(desc = "int", def = "-1") int copies) throws WorldEditException {
player.print(BBC.BRUSH_SPLINE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline"));
set(context, new SweepBrush(copies));
}
@ -333,7 +334,7 @@ public class BrushCommands {
@Arg(desc = "double", def = "0") double bias,
@Arg(desc = "double", def = "0") double continuity,
@Arg(desc = "double", def = "10") double quality) throws WorldEditException {
player.print(BBC.BRUSH_SPLINE.format(radius));
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline", (radius)));
worldEdit.checkMaxBrushRadius(radius);
set(context,
new SurfaceSpline(tension, bias, continuity, quality))
@ -388,7 +389,7 @@ public class BrushCommands {
switch (type.getInternalId()) {
case BlockID.SAND:
case BlockID.GRAVEL:
player.print(BBC.BRUSH_TRY_OTHER.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.try.other"));
falling = true;
}
}
@ -539,12 +540,12 @@ public class BrushCommands {
try {
MultiClipboardHolder clipboards = ClipboardFormats.loadAllFromInput(player, clipboardStr, null, true);
if (clipboards == null) {
BBC.SCHEMATIC_NOT_FOUND.send(player, clipboardStr);
player.print(TranslatableComponent.of("fawe.error.schematic.not.found" , clipboardStr));
return;
}
List<ClipboardHolder> holders = clipboards.getHolders();
if (holders == null) {
BBC.SCHEMATIC_NOT_FOUND.send(player, clipboardStr);
player.print(TranslatableComponent.of("fawe.error.schematic.not.found" , clipboardStr));
return;
}
@ -845,7 +846,7 @@ public class BrushCommands {
@Switch(name = 'r', desc = "Apply random rotation on paste") boolean randomRotate,
@Switch(name = 'a', desc = "Apply auto view based rotation on paste") boolean autoRotate) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
player.print(BBC.BRUSH_COPY.format(radius));
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.copy", (radius)));
set(context,
new CopyPastaBrush(player, session, randomRotate, autoRotate))
@ -920,7 +921,7 @@ public class BrushCommands {
tool.setPrimary(settings);
tool.setSecondary(settings);
BBC.BRUSH_EQUIPPED.send(player, arguments.get().split(" ")[1]);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.equipped" , arguments.get().split(" ")[1]));
}
return settings;
}
@ -983,9 +984,9 @@ public class BrushCommands {
} catch (Throwable e) {
e.printStackTrace();
}
BBC.SCHEMATIC_SAVED.send(player, name);
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.saved" , name));
} else {
player.printError(BBC.BRUSH_NONE.s());
player.printError(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
}
}
@ -1006,7 +1007,7 @@ public class BrushCommands {
}
if (!file.exists()) {
File[] files = folder.listFiles(pathname -> false);
BBC.BRUSH_NOT_FOUND.send(player, name);
player.print(TranslatableComponent.of("fawe.error.brush.not.found" , name));
return;
}
try (DataInputStream in = new DataInputStream(
@ -1015,10 +1016,10 @@ public class BrushCommands {
BrushTool tool = BrushTool.fromString(player, session, json);
BaseItem item = player.getItemInHand(HandSide.MAIN_HAND);
session.setTool(item, tool, player);
BBC.BRUSH_EQUIPPED.send(player, name);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.equipped" , name));
} catch (Throwable e) {
e.printStackTrace();
player.printError(BBC.BRUSH_INCOMPATIBLE.s());
player.printError(TranslatableComponent.of("fawe.error.brush.incompatible"));
}
}

Datei anzeigen

@ -167,7 +167,7 @@ public class ChunkCommands {
actor.printDebug(String.format("%d chunks total marked for deletion. (May have overlaps).",
currentInfo.batches.stream().mapToInt(ChunkDeletionInfo.ChunkBatch::getChunkCount).sum()));
}
actor.print(TextComponent.of("You can mark more chunks for deletion, or to stop now, run: ", TextColor.LIGHT_PURPLE)
actor.print(TextComponent.of("You can mark more chunks for deletion, or to stop now, run: ", TextColor.GRAY)
.append(TextComponent.of("/stop", TextColor.AQUA)
.clickEvent(ClickEvent.of(ClickEvent.Action.SUGGEST_COMMAND, "/stop"))));
}

Datei anzeigen

@ -24,6 +24,7 @@ import com.google.common.collect.Lists;
import com.boydti.fawe.FaweAPI;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.RunnableVal;
@ -153,7 +154,8 @@ public class ClipboardCommands {
}
Operations.completeLegacy(copy);
if (!actor.hasPermission("fawe.tips")) {
BBC.TIP_PASTE.or(BBC.TIP_DOWNLOAD, BBC.TIP_ROTATE, BBC.TIP_COPYPASTE, BBC.TIP_REPLACE_MARKER, BBC.TIP_COPY_PATTERN).send(actor);
System.out.println("TODO FIXME tips");
// TranslatableComponent.of("fawe.tips.tip.paste").or(TranslatableComponent.of("fawe.tips.tip.download"), TranslatableComponent.of("fawe.tips.tip.rotate"), TranslatableComponent.of("fawe.tips.tip.copypaste"), TranslatableComponent.of("fawe.tips.tip.replace.marker"), TranslatableComponent.of("fawe.tips.tip.copy.pattern")).send(actor);
}
copy.getStatusMessages().forEach(actor::print);
}
@ -176,16 +178,17 @@ public class ClipboardCommands {
long volume = (((long) max.getX() - (long) min.getX() + 1) * ((long) max.getY() - (long) min.getY() + 1) * ((long) max.getZ() - (long) min.getZ() + 1));
FaweLimit limit = actor.getLimit();
if (volume >= limit.MAX_CHECKS) {
throw new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MAX_CHECKS);
throw new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.checks"));
}
session.setClipboard(null);
ReadOnlyClipboard lazyClipboard = ReadOnlyClipboard.of(region, !skipEntities, copyBiomes);
lazyClipboard.setOrigin(session.getPlacementPosition(actor));
session.setClipboard(new ClipboardHolder(lazyClipboard));
BBC.COMMAND_COPY.send(actor, region.getArea());
actor.print(TranslatableComponent.of("fawe.worldedit.copy.command.copy" , region.getArea()));
if (!actor.hasPermission("fawe.tips")) {
BBC.TIP_PASTE.or(BBC.TIP_LAZYCOPY, BBC.TIP_DOWNLOAD, BBC.TIP_ROTATE, BBC.TIP_COPYPASTE, BBC.TIP_REPLACE_MARKER, BBC.TIP_COPY_PATTERN).send(actor);
System.out.println("TODO FIXME tips");
// TranslatableComponent.of("fawe.tips.tip.paste").or(TranslatableComponent.of("fawe.tips.tip.lazycopy"), TranslatableComponent.of("fawe.tips.tip.download"), TranslatableComponent.of("fawe.tips.tip.rotate"), TranslatableComponent.of("fawe.tips.tip.copypaste"), TranslatableComponent.of("fawe.tips.tip.replace.marker"), TranslatableComponent.of("fawe.tips.tip.copy.pattern")).send(actor);
}
}
@ -217,7 +220,7 @@ public class ClipboardCommands {
// ReadOnlyClipboard lazyClipboard = new WorldCutClipboard(editSession, region, !skipEntities, copyBiomes);
// clipboard.setOrigin(session.getPlacementPosition(actor));
// session.setClipboard(new ClipboardHolder(lazyClipboard));
// BBC.COMMAND_CUT_LAZY.send(actor, region.getArea());
// actor.print(TranslatableComponent.of("fawe.worldedit.cut.command.cut.lazy" , region.getArea()));
// }
@Command(
@ -273,7 +276,7 @@ public class ClipboardCommands {
session.setClipboard(new ClipboardHolder(clipboard));
if (!actor.hasPermission("fawe.tips")) {
BBC.TIP_LAZYCUT.send(actor);
actor.print(TranslatableComponent.of("fawe.tips.tip.lazycut"));
}
copy.getStatusMessages().forEach(actor::print);
}
@ -287,11 +290,11 @@ public class ClipboardCommands {
public void download(final Player player, final LocalSession session, @Arg(name = "format", desc = "String", def = "schem") final String formatName) throws WorldEditException {
final ClipboardFormat format = ClipboardFormats.findByAlias(formatName);
if (format == null) {
BBC.CLIPBOARD_INVALID_FORMAT.send(player, formatName);
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.invalid.format" , formatName));
return;
}
BBC.GENERATING_LINK.send(player, formatName);
player.print(TranslatableComponent.of("fawe.web.generating.link" , formatName));
ClipboardHolder holder = session.getClipboard();
URL url;
@ -360,14 +363,14 @@ public class ClipboardCommands {
}
} else {
if (Settings.IMP.WEB.URL.isEmpty()) {
BBC.SETTING_DISABLE.send(player, "web.url");
player.print(TranslatableComponent.of("fawe.error.setting.disable", "web.url"));
return;
}
url = FaweAPI.upload(target, format);
}
}
if (url == null) {
player.printError(BBC.GENERATING_LINK_FAILED.s());
player.printError(TranslatableComponent.of("fawe.web.generating.link.failed"));
} else {
String urlText = url.toString();
if (Settings.IMP.WEB.SHORTEN_URLS) {
@ -377,7 +380,7 @@ public class ClipboardCommands {
e.printStackTrace();
}
}
BBC.DOWNLOAD_LINK.send(player, urlText);
player.print(TranslatableComponent.of("fawe.web.download.link" , urlText));
}
}
@ -401,16 +404,16 @@ public class ClipboardCommands {
} else {
target = clipboard;
}
BBC.GENERATING_LINK.send(player, format.getName());
player.print(TranslatableComponent.of("fawe.web.generating.link" , format.getName()));
if (Settings.IMP.WEB.ASSETS.isEmpty()) {
BBC.SETTING_DISABLE.send(player, "web.assets");
player.print(TranslatableComponent.of("fawe.error.setting.disable", "web.assets"));
return;
}
URL url = format.uploadPublic(target, category.replaceAll("[/|\\\\]", "."), player.getName());
if (url == null) {
player.printError(BBC.GENERATING_LINK_FAILED.s());
player.printError(TranslatableComponent.of("fawe.web.generating.link.failed"));
} else {
BBC.DOWNLOAD_LINK.send(player, Settings.IMP.WEB.ASSETS);
player.print(TranslatableComponent.of("fawe.web.download.link" , Settings.IMP.WEB.ASSETS));
}
}
@ -474,7 +477,8 @@ public class ClipboardCommands {
selector.explainRegionAdjust(actor, session);
}
if (!actor.hasPermission("fawe.tips")) {
BBC.TIP_COPYPASTE.or(BBC.TIP_SOURCE_MASK, BBC.TIP_REPLACE_MARKER).send(actor, to);
System.out.println("TODO FIXME tips");
// TranslatableComponent.of("fawe.tips.tip.copypaste").or(TranslatableComponent.of("fawe.tips.tip.source.mask"), TranslatableComponent.of("fawe.tips.tip.replace.marker")).send(actor, to);
}
if (onlySelect) {
actor.printInfo(TranslatableComponent.of("worldedit.paste.selected"));
@ -491,7 +495,7 @@ public class ClipboardCommands {
PasteEvent event = new PasteEvent(player, clipboard, uri, editSession, to);
WorldEdit.getInstance().getEventBus().post(event);
if (event.isCancelled()) {
throw new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MANUAL);
throw new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.manual"));
}
}
@ -527,10 +531,10 @@ public class ClipboardCommands {
selector.learnChanges();
selector.explainRegionAdjust(actor, session);
}
BBC.COMMAND_PASTE.send(actor, to);
actor.print(TranslatableComponent.of("fawe.worldedit.paste.command.paste" , to));
if (!actor.hasPermission("fawe.tips")) {
actor.print(BBC.TIP_COPYPASTE.s());
actor.print(TranslatableComponent.of("fawe.tips.tip.copypaste"));
}
}
@ -558,7 +562,8 @@ public class ClipboardCommands {
holder.setTransform(holder.getTransform().combine(transform));
actor.printInfo(TranslatableComponent.of("worldedit.rotate.rotated"));
if (!actor.hasPermission("fawe.tips")) {
BBC.TIP_FLIP.or(BBC.TIP_DEFORM, BBC.TIP_TRANSFORM).send(actor);
System.out.println("TODO FIXME tips");
// TranslatableComponent.of("fawe.tips.tip.flip").or(TranslatableComponent.of("fawe.tips.tip.deform"), TranslatableComponent.of("fawe.tips.tip.transform")).send(actor);
}
}

Datei anzeigen

@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.extent.ResettableExtent;
import com.boydti.fawe.util.CachedTextureUtil;
import com.boydti.fawe.util.CleanTextureUtil;
@ -357,7 +358,7 @@ public class GeneralCommands {
// TODO NOT IMPLEMENTED convert this to an ArgumentConverter
if (arguments.isEmpty()) {
session.setTextureUtil(null);
player.print(BBC.TEXTURE_DISABLED.s());
player.print(TranslatableComponent.of("fawe.worldedit.general.texture.disabled"));
} else {
String arg = arguments.get(0);
String argLower = arg.toLowerCase(Locale.ROOT);
@ -400,7 +401,7 @@ public class GeneralCommands {
}
if (!(util instanceof CachedTextureUtil)) util = new CachedTextureUtil(util);
session.setTextureUtil(util);
BBC.TEXTURE_SET.send(player, StringMan.join(arguments, " "));
player.print(TranslatableComponent.of("fawe.worldedit.general.texture.set" , StringMan.join(arguments, " ")));
}
}
@ -414,9 +415,9 @@ public class GeneralCommands {
public void gsmask(Player player, LocalSession session, EditSession editSession, @Arg(desc = "The mask to set", def = "") Mask maskOpt) throws WorldEditException {
session.setSourceMask(maskOpt);
if (maskOpt == null) {
player.print(BBC.SOURCE_MASK_DISABLED.s());
player.print(TranslatableComponent.of("fawe.worldedit.general.source.mask.disabled"));
} else {
player.print(BBC.SOURCE_MASK.s());
player.print(TranslatableComponent.of("fawe.worldedit.general.source.mask"));
}
}
@ -430,9 +431,9 @@ public class GeneralCommands {
public void gtransform(Player player, EditSession editSession, LocalSession session, ResettableExtent transform) throws WorldEditException {
session.setTransform(transform);
if (transform == null) {
player.print(BBC.TRANSFORM_DISABLED.s());
player.print(TranslatableComponent.of("fawe.worldedit.general.transform.disabled"));
} else {
player.print(BBC.TRANSFORM.s());
player.print(TranslatableComponent.of("fawe.worldedit.general.transform"));
}
}
@ -444,9 +445,9 @@ public class GeneralCommands {
@CommandPermissions("fawe.tips")
public void tips(Player player, LocalSession session) throws WorldEditException {
if (player.togglePermission("fawe.tips")) {
player.print(BBC.WORLDEDIT_TOGGLE_TIPS_ON.s());
player.print(TranslatableComponent.of("fawe.info.worldedit.toggle.tips.on"));
} else {
player.print(BBC.WORLDEDIT_TOGGLE_TIPS_OFF.s());
player.print(TranslatableComponent.of("fawe.info.worldedit.toggle.tips.off"));
}
}
}

Datei anzeigen

@ -26,6 +26,7 @@ import static com.sk89q.worldedit.internal.command.CommandUtil.checkCommandArgum
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.TextureUtil;
@ -110,7 +111,7 @@ public class GenerationCommands {
@Arg(name = "pocketMax", desc = "TODO", def = "3") int pocketMaxOpt) throws WorldEditException {
CavesGen gen = new CavesGen(sizeOpt, frequencyOpt, rarityOpt, minYOpt, maxYOpt, systemFrequencyOpt, individualRarityOpt, pocketChanceOpt, pocketMinOpt, pocketMaxOpt);
editSession.generate(region, gen);
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
actor.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , editSession.getBlockChangeCount()));
}
@ -123,7 +124,7 @@ public class GenerationCommands {
@Confirm(Confirm.Processor.REGION)
public void ores(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, @Arg(desc = "Mask") Mask mask) throws WorldEditException {
editSession.addOres(region, mask);
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
actor.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , editSession.getBlockChangeCount()));
}
@Command(
@ -164,7 +165,7 @@ public class GenerationCommands {
return false;
});
Operations.completeBlindly(visitor);
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
actor.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , editSession.getBlockChangeCount()));
}
@Command(
@ -176,7 +177,7 @@ public class GenerationCommands {
@Confirm(Confirm.Processor.REGION)
public void ore(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, @Arg(desc = "Mask") Mask mask, @Arg(desc = "Pattern") Pattern material, @Arg(desc="Ore vein size") @Range(from = 0, to=Integer.MAX_VALUE) int size, int freq, @Range(from=0, to=100) int rarity, @Range(from=0, to=255) int minY, @Range(from=0, to=255) int maxY) throws WorldEditException {
editSession.addOre(region, mask, material, size, freq, rarity, minY, maxY);
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
actor.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , editSession.getBlockChangeCount()));
}
@Command(

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweAPI;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.database.DBHandler;
import com.boydti.fawe.database.RollbackDatabase;
@ -88,13 +89,13 @@ public class HistoryCommands {
@CommandPermissions("worldedit.history.rollback")
public void faweRollback(Player player, LocalSession session, @Arg(desc = "String user") String user, @Arg(def = "0", desc = "radius") @Range(from = 0, to=Integer.MAX_VALUE) int radius, @Arg(name = "time", desc = "String", def = "0") String time, @Switch(name = 'r', desc = "TODO") boolean restore) throws WorldEditException {
if (!Settings.IMP.HISTORY.USE_DATABASE) {
BBC.SETTING_DISABLE.send(player, "history.use-database (Import with /frb #import )");
player.print(TranslatableComponent.of("fawe.error.setting.disable" , "history.use-database (Import with /frb #import )"));
return;
}
if (user.charAt(0) == '#') {
if (user.equals("#import")) {
if (!player.hasPermission("fawe.rollback.import")) {
BBC.NO_PERM.send(player, "fawe.rollback.import");
player.print(TranslatableComponent.of("fawe.error.no.perm", "fawe.rollback.import"));
return;
}
File folder = MainUtil.getFile(Fawe.imp().getDirectory(), Settings.IMP.PATHS.HISTORY);
@ -147,7 +148,7 @@ public class HistoryCommands {
}
String toParse = user.substring(1);
if (!MathMan.isInteger(toParse)) {
BBC.COMMAND_SYNTAX.send(player, "/frb #<index>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb #<index>"));
return;
}
int index = Integer.parseInt(toParse);
@ -157,24 +158,24 @@ public class HistoryCommands {
if (file.getBDFile().exists()) {
if (restore) file.redo(player);
else file.undo(player);
BBC.ROLLBACK_ELEMENT.send(player, world.getName() + "/" + user + "-" + index);
player.print(TranslatableComponent.of("fawe.worldedit.rollback.rollback.element" , world.getName() + "/" + user + "-" + index));
} else {
BBC.TOOL_INSPECT_INFO_FOOTER.send(player, 0);
player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.inspect.info.footer" , 0));
}
return;
}
UUID other = Fawe.imp().getUUID(user);
if (other == null) {
BBC.PLAYER_NOT_FOUND.send(player, user);
player.print(TranslatableComponent.of("fawe.error.player.not.found" , user));
return;
}
if (radius == 0) {
BBC.COMMAND_SYNTAX.send(player, "/frb " + user + " <radius> <time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb " + user + " <radius> <time>"));
return;
}
long timeDiff = MainUtil.timeToSec(time) * 1000;
if (timeDiff == 0) {
BBC.COMMAND_SYNTAX.send(player, "/frb " + user + " " + radius + " <time>");
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb " + user + " " + radius + " <time>"));
return;
}
radius = Math.max(Math.min(500, radius), 0);
@ -189,7 +190,7 @@ public class HistoryCommands {
Region[] allowedRegions = player.getCurrentRegions(FaweMaskManager.MaskType.OWNER);
if (allowedRegions == null) {
player.printError(BBC.NO_REGION.s());
player.printError(TranslatableComponent.of("fawe.error.no.region"));
return;
}
// TODO mask the regions bot / top to the bottom and top coord in the allowedRegions
@ -203,10 +204,10 @@ public class HistoryCommands {
@Override
public void run(DiskStorageHistory edit) {
edit.undo(player, allowedRegions);
BBC.ROLLBACK_ELEMENT.send(player, edit.getWorld().getName() + "/" + user + "-" + edit.getIndex());
player.print(TranslatableComponent.of("fawe.worldedit.rollback.rollback.element" , edit.getWorld().getName() + "/" + user + "-" + edit.getIndex()));
count.incrementAndGet();
}
}, () -> BBC.TOOL_INSPECT_INFO_FOOTER.send(player, count), true, restore);
}, () -> player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.inspect.info.footer" , count)), true, restore);
}
@Command(
@ -235,7 +236,7 @@ public class HistoryCommands {
times = Math.max(1, times);
LocalSession undoSession = session;
if (session.hasFastMode()) {
player.print(BBC.COMMAND_UNDO_DISABLED.s());
player.print(TranslatableComponent.of("fawe.worldedit.history.command.undo.disabled"));
return;
}
if (playerName != null) {

Datei anzeigen

@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
import static com.sk89q.worldedit.command.util.Logging.LogMode.POSITION;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldEditException;

Datei anzeigen

@ -62,17 +62,17 @@ import static org.enginehub.piston.part.CommandParts.arg;
@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class)
public class PaintBrushCommands {
private static final CommandArgument REGION_FACTORY = arg(TranslatableComponent.of("shape"), TranslatableComponent.of("worldedit.brush.paint.shape"))
private static final CommandArgument REGION_FACTORY = arg(TranslatableComponent.of("shape") , TranslatableComponent.of("worldedit.brush.paint.shape"))
.defaultsTo(ImmutableList.of())
.ofTypes(ImmutableList.of(Key.of(RegionFactory.class)))
.build();
private static final CommandArgument RADIUS = arg(TranslatableComponent.of("radius"), TranslatableComponent.of("worldedit.brush.paint.size"))
private static final CommandArgument RADIUS = arg(TranslatableComponent.of("radius") , TranslatableComponent.of("worldedit.brush.paint.size"))
.defaultsTo(ImmutableList.of("5"))
.ofTypes(ImmutableList.of(Key.of(double.class)))
.build();
private static final CommandArgument DENSITY = arg(TranslatableComponent.of("density"), TranslatableComponent.of("worldedit.brush.paint.density"))
private static final CommandArgument DENSITY = arg(TranslatableComponent.of("density") , TranslatableComponent.of("worldedit.brush.paint.density"))
.defaultsTo(ImmutableList.of("20"))
.ofTypes(ImmutableList.of(Key.of(double.class)))
.build();
@ -92,7 +92,7 @@ public class PaintBrushCommands {
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.paint")));
builder.addParts(REGION_FACTORY, RADIUS, DENSITY);
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type"), TranslatableComponent.of("worldedit.brush.paint.type"))
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type") , TranslatableComponent.of("worldedit.brush.paint.type"))
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
.required()
.build());

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
import com.boydti.fawe.FaweAPI;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.FaweLimit;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.EditSession;
@ -62,6 +63,7 @@ import com.sk89q.worldedit.regions.Regions;
import static com.sk89q.worldedit.command.util.Logging.LogMode.ALL;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.TreeGenerator.TreeType;
import com.sk89q.worldedit.util.formatting.text.serializer.legacy.LegacyComponentSerializer;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder;
@ -119,7 +121,8 @@ public class RegionCommands {
if (affected != 0) {
actor.printInfo(TranslatableComponent.of("worldedit.set.done"));
if (!actor.hasPermission("fawe.tips"))
BBC.TIP_FAST.or(BBC.TIP_CANCEL, BBC.TIP_MASK, BBC.TIP_MASK_ANGLE, BBC.TIP_SET_LINEAR, BBC.TIP_SURFACE_SPREAD, BBC.TIP_SET_HAND).send(actor);
System.out.println("TODO FIXME TIPS");
// TranslatableComponent.of("fawe.tips.tip.fast").or(TranslatableComponent.of("fawe.tips.tip.cancel"), TranslatableComponent.of("fawe.tips.tip.mask"), TranslatableComponent.of("fawe.tips.tip.mask.angle"), TranslatableComponent.of("fawe.tips.tip.set.linear"), TranslatableComponent.of("fawe.tips.tip.surface.spread"), TranslatableComponent.of("fawe.tips.tip.set.hand")).send(actor);
}
return 0;
}
@ -142,7 +145,6 @@ public class RegionCommands {
@CommandPermissions("worldedit.region.test")
@Logging(REGION)
public void test(Player player, EditSession editSession, @Arg(desc = "test") @Confirm(RADIUS) BlockVector3 radius) throws WorldEditException {
player.print("Run test " + radius);
// editSession.addProcessor(new ChunkSendProcessor(editSession.getWorld(), () -> Collections.singleton(player)));
// editSession.addProcessor(NullProcessor.INSTANCE);
// FlatRegionFunction replace = new BiomeReplace(editSession, biome);
@ -164,7 +166,7 @@ public class RegionCommands {
selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
}
int count = FaweAPI.fixLighting(player.getWorld(), selection,null);
BBC.LIGHTING_PROPAGATE_SELECTION.send(player, count);
player.print(TranslatableComponent.of("fawe.info.lighting.propagate.selection" , count));
}
@Command(
@ -192,7 +194,7 @@ public class RegionCommands {
selection = new CuboidRegion(BlockVector3.at(cx - 8, 0, cz - 8).multiply(16), BlockVector3.at(cx + 8, 0, cz + 8).multiply(16));
}
int count = FaweAPI.fixLighting(player.getWorld(), selection, null);
BBC.UPDATED_LIGHTING_SELECTION.send(player, count);
player.print(TranslatableComponent.of("fawe.info.updated.lighting.selection" , count));
}
@Command(
@ -204,14 +206,14 @@ public class RegionCommands {
public void nbtinfo(Player player, EditSession editSession) {
Location pos = player.getBlockTrace(128);
if (pos == null) {
player.printError(BBC.NO_BLOCK.s());
player.printError(TranslatableComponent.of("fawe.navigation.no.block"));
return;
}
CompoundTag nbt = editSession.getFullBlock(pos.toBlockPoint()).getNbtData();
if (nbt != null) {
player.print(nbt.getValue().toString());
} else {
player.printError(BBC.NO_BLOCK.s());
player.printError(TranslatableComponent.of("fawe.navigation.no.block"));
}
}
@ -349,7 +351,7 @@ public class RegionCommands {
editSession.setBlock(x, y, z, patternArg);
affected++;
}
BBC.VISITOR_BLOCK.send(player, affected);
player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , affected));
}
@Command(
@ -448,9 +450,9 @@ public class RegionCommands {
@CommandPermissions("fawe.admin")
public void wea(Actor actor) throws WorldEditException {
if (actor.togglePermission("fawe.bypass")) {
actor.print(BBC.WORLDEDIT_BYPASSED.s());
actor.print(TranslatableComponent.of("fawe.info.worldedit.bypassed"));
} else {
actor.print(BBC.WORLDEDIT_RESTRICTED.s());
actor.print(TranslatableComponent.of("fawe.info.worldedit.restricted"));
}
}
@ -464,10 +466,10 @@ public class RegionCommands {
public void wer(Player player) throws WorldEditException {
final Region region = player.getLargestRegion();
if (region == null) {
player.print(BBC.NO_REGION.s());
player.print(TranslatableComponent.of("fawe.error.no.region"));
} else {
player.setSelection(region);
player.print(BBC.SET_REGION.s());
player.print(TranslatableComponent.of("fawe.info.set.region"));
}
}
@ -480,7 +482,7 @@ public class RegionCommands {
@CommandPermissions("worldedit.region.move")
@Logging(ORIENTATION_REGION)
@Confirm(Confirm.Processor.REGION)
public void move(Actor actor, World world, EditSession editSession, LocalSession session,
public int move(Actor actor, World world, EditSession editSession, LocalSession session,
@Selection Region region,
@Arg(desc = "# of blocks to move", def = "1")
int count,
@ -543,7 +545,7 @@ public class RegionCommands {
@Arg(desc = "BlockStateHolder", def = "air") BlockStateHolder replace,
@Switch(name = 'm', desc = "TODO") boolean notFullHeight) throws WorldEditException {
int affected = editSession.fall(region, !notFullHeight, replace);
BBC.VISITOR_BLOCK.send(player, affected);
player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , affected));
}
@Command(
@ -552,7 +554,7 @@ public class RegionCommands {
)
@CommandPermissions("worldedit.region.stack")
@Logging(ORIENTATION_REGION)
public void stack(Actor actor, World world, EditSession editSession, LocalSession session,
public int stack(Actor actor, World world, EditSession editSession, LocalSession session,
@Selection Region region,
@Arg(desc = "# of copies to stack", def = "1")
@Confirm(Confirm.Processor.REGION) int count,
@ -663,7 +665,7 @@ public class RegionCommands {
@CommandPermissions("worldedit.regen")
@Logging(REGION)
@Confirm(Confirm.Processor.REGION)
public void regenerateChunk(Player player, LocalSession session, EditSession editSession, @Selection Region region,
public void regenerateChunk(Actor actor, LocalSession session, EditSession editSession, @Selection Region region,
@Arg(def = "", desc = "Regenerate with biome") BiomeType biome,
@Arg(def = "", desc = "Regenerate with seed") Long seed) throws WorldEditException {
Mask mask = session.getMask();

Datei anzeigen

@ -23,6 +23,7 @@ import static com.boydti.fawe.util.ReflectionUtils.as;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
import com.boydti.fawe.object.clipboard.URIClipboardHolder;
@ -134,14 +135,14 @@ public class SchematicCommands {
boolean randomRotate) throws FilenameException {
final ClipboardFormat format = ClipboardFormats.findByAlias(formatName);
if (format == null) {
BBC.CLIPBOARD_INVALID_FORMAT.send(player, formatName);
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.invalid.format" , formatName));
return;
}
try {
MultiClipboardHolder all = ClipboardFormats.loadAllFromInput(player, filename, null, true);
if (all != null) {
session.addClipboard(all);
BBC.SCHEMATIC_LOADED.send(player, filename);
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.loaded" , filename));
}
} catch (IOException e) {
throw new RuntimeException(e);
@ -155,7 +156,7 @@ public class SchematicCommands {
@CommandPermissions({"worldedit.clipboard.clear", "worldedit.schematic.clear"})
public void clear(Player player, LocalSession session) throws WorldEditException {
session.setClipboard(null);
player.print(BBC.CLIPBOARD_CLEARED.s());
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.cleared"));
}
@Command(
@ -185,11 +186,11 @@ public class SchematicCommands {
} else {
session.setClipboard(null);
}
player.print(BBC.CLIPBOARD_CLEARED.s());
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.cleared"));
return;
}
}
BBC.CLIPBOARD_URI_NOT_FOUND.send(player, fileName);
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.uri.not.found" , fileName));
}
@Command(
@ -225,7 +226,7 @@ public class SchematicCommands {
URI uri;
if (filename.startsWith("url:")) {
if (!actor.hasPermission("worldedit.schematic.load.web")) {
BBC.NO_PERM.send(actor, "worldedit.schematic.load.web");
actor.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.load.web"));
return;
}
UUID uuid = UUID.fromString(filename.substring(4));
@ -252,7 +253,7 @@ public class SchematicCommands {
}
} else {
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && !actor.hasPermission("worldedit.schematic.load.other") && Pattern.compile("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}").matcher(filename).find()) {
BBC.NO_PERM.send(actor, "worldedit.schematic.load.other");
actor.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.load.other"));
return;
}
if (format == null && filename.matches(".*\\.[\\w].*")) {
@ -282,7 +283,7 @@ public class SchematicCommands {
uri = file.toURI();
}
format.hold(actor, uri, in);
BBC.SCHEMATIC_LOADED.send(actor, filename);
actor.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.loaded" , filename));
} catch (IllegalArgumentException e) {
actor.printError("Unknown filename: " + filename);
} catch (URISyntaxException | IOException e) {
@ -331,7 +332,7 @@ public class SchematicCommands {
if (filename.contains("../")) {
other = true;
if (!actor.hasPermission("worldedit.schematic.save.other")) {
BBC.NO_PERM.send(actor, "worldedit.schematic.save.other");
actor.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.save.other"));
return;
}
if (filename.startsWith("../")) {
@ -349,7 +350,7 @@ public class SchematicCommands {
}
if (other) {
if (!actor.hasPermission("worldedit.schematic.delete.other")) {
BBC.NO_PERM.send(actor, "worldedit.schematic.delete.other");
actor.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.delete.other"));
return;
}
}
@ -395,13 +396,13 @@ public class SchematicCommands {
return;
}
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && !MainUtil.isInSubDirectory(dir, destDir) && !player.hasPermission("worldedit.schematic.move.other")) {
BBC.NO_PERM.send(player, "worldedit.schematic.move.other");
player.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.move.other"));
return;
}
ClipboardHolder clipboard = session.getClipboard();
List<File> sources = getFiles(clipboard);
if (sources.isEmpty()) {
player.printError(BBC.SCHEMATIC_NONE.s());
player.printError(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"));
return;
}
if (!destDir.exists() && !destDir.mkdirs()) {
@ -411,19 +412,19 @@ public class SchematicCommands {
for (File source : sources) {
File destFile = new File(destDir, source.getName());
if (destFile.exists()) {
BBC.SCHEMATIC_MOVE_EXISTS.send(player, destFile);
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.move.exists" , destFile));
continue;
}
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && (!MainUtil.isInSubDirectory(dir, destFile) || !MainUtil.isInSubDirectory(dir, source)) && !player.hasPermission("worldedit.schematic.delete.other")) {
BBC.SCHEMATIC_MOVE_FAILED.send(player, destFile,
BBC.NO_PERM.format("worldedit.schematic.move.other"));
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.move.failed", destFile,
TranslatableComponent.of("fawe.error.no.perm", ("worldedit.schematic.move.other"))));
continue;
}
try {
File cached = new File(source.getParentFile(), "." + source.getName() + ".cached");
Files.move(source.toPath(), destFile.toPath());
if (cached.exists()) Files.move(cached.toPath(), destFile.toPath());
BBC.SCHEMATIC_MOVE_SUCCESS.send(player, source, destFile);
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.move.success" , source, destFile));
} catch (IOException e) {
throw new RuntimeException(e);
}
@ -482,7 +483,7 @@ public class SchematicCommands {
if (args.argsLength() == 0) {
if (fp.getSession().getVirtualWorld() != null) fp.setVirtualWorld(null);
else {
BBC.COMMAND_SYNTAX.send(player, "/" + Commands.getAlias(SchematicCommands.class, "schematic") + " " + getCommand().aliases()[0] + " " + getCommand().usage());
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/" + Commands.getAlias(SchematicCommands.class, "schematic") + " " + getCommand().aliases()[0] + " " + getCommand().usage()));
}
return;
}
@ -504,11 +505,11 @@ public class SchematicCommands {
long total = count.longValue();
if (total == 0) {
if (args.getJoinedStrings(0).toLowerCase().startsWith("all")) {
BBC.SCHEMATIC_NONE.send(player);
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;
BBC.HELP_SUGGEST.send(player, joined, cmd);
player.print(TranslatableComponent.of("fawe.worldedit.help.help.suggest" , joined, cmd));
}
return;
}
@ -517,11 +518,11 @@ public class SchematicCommands {
String cmdPrefix = "/" + (config.noDoubleSlash ? "" : "/");
String cmdShow = Commands.getAlias(ClipboardCommands.class, "schematic") + " " + Commands.getAlias(ClipboardCommands.class, "show");
BBC.SCHEMATIC_SHOW.send(fp, count.longValue(), args.getJoinedStrings(0), cmdShow);
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");
BBC.SCHEMATIC_PROMPT_CLEAR.send(fp, cmd);
fp.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.prompt.clear" , cmd));
}
} catch (Throwable e) {
@ -720,9 +721,9 @@ public class SchematicCommands {
writer.write(target);
}
log.info(actor.getName() + " saved " + file.getCanonicalPath());
BBC.SCHEMATIC_SAVED.send(actor, file.getName());
actor.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.saved" , file.getName()));
} else {
actor.printError(BBC.WORLDEDIT_CANCEL_REASON_MANUAL.s());
actor.printError(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.manual"));
}
}
return null;
@ -836,14 +837,14 @@ public class SchematicCommands {
continue;
}
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && !MainUtil.isInSubDirectory(dir, f) && !actor.hasPermission("worldedit.schematic.delete.other")) {
BBC.NO_PERM.send(actor, "worldedit.schematic.delete.other");
actor.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.delete.other"));
continue;
}
if (!deleteFile(f)) {
actor.printError(TranslatableComponent.of("worldedit.schematic.delete.failed", TextComponent.of(filename)));
continue;
}
BBC.FILE_DELETED.send(actor, filename);
actor.print(TranslatableComponent.of("fawe.info.file.deleted" , filename));
}
}

Datei anzeigen

@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
import static com.sk89q.worldedit.command.util.Logging.LogMode.ALL;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldEditException;

Datei anzeigen

@ -25,6 +25,7 @@ import static com.sk89q.worldedit.command.util.Logging.LogMode.POSITION;
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.clipboard.URIClipboardHolder;
import com.boydti.fawe.object.mask.IdMask;
import com.boydti.fawe.object.regions.selector.FuzzyRegionSelector;
@ -303,7 +304,8 @@ public class SelectionCommands {
player.printInfo(TranslatableComponent.of("worldedit.wand.selwand.info"));
}
if (!player.hasPermission("fawe.tips"))
BBC.TIP_SEL_LIST.or(BBC.TIP_SELECT_CONNECTED, BBC.TIP_SET_POS1, BBC.TIP_FARWAND, BBC.TIP_DISCORD).send(player);
System.out.println("TODO FIXME tips");
// TranslatableComponent.of("fawe.tips.tip.sel.list").or(TranslatableComponent.of("fawe.tips.tip.select.connected"), TranslatableComponent.of("fawe.tips.tip.set.pos1"), TranslatableComponent.of("fawe.tips.tip.farwand"), TranslatableComponent.of("fawe.tips.tip.discord")).send(player);
}
@Command(
@ -590,11 +592,11 @@ public class SelectionCommands {
final BlockState state = c.getID();
final BlockType blockType = state.getBlockType();
TextComponent blockName = TextComponent.of(blockType.getName(), TextColor.LIGHT_PURPLE);
TextComponent blockName = TextComponent.of(blockType.getName(), TextColor.GRAY);
TextComponent toolTip;
if (separateStates && state != blockType.getDefaultState()) {
toolTip = TextComponent.of(state.getAsString(), TextColor.GRAY);
blockName = blockName.append(TextComponent.of("*", TextColor.LIGHT_PURPLE));
blockName = blockName.append(TextComponent.of("*", TextColor.GRAY));
} else {
toolTip = TextComponent.of(blockType.getId(), TextColor.GRAY);
}
@ -677,10 +679,10 @@ public class SelectionCommands {
}
case POLYHEDRAL:
newSelector = new PolyhedralRegionSelector(world);
actor.print(BBC.SEL_CONVEX_POLYHEDRAL.s());
actor.print(TranslatableComponent.of("fawe.selection.sel.convex.polyhedral"));
Optional<Integer> limit = ActorSelectorLimits.forActor(actor).getPolyhedronVertexLimit();
limit.ifPresent(integer -> actor.print(BBC.SEL_MAX.format(integer)));
actor.print(BBC.SEL_LIST.s());
limit.ifPresent(integer -> actor.print(TranslatableComponent.of("fawe.selection.sel.max", (integer))));
actor.print(TranslatableComponent.of("fawe.selection.sel.list"));
break;
case FUZZY:
case MAGIC:
@ -689,8 +691,8 @@ public class SelectionCommands {
}
//TODO Make FuzzyRegionSelector accept actors
newSelector = new FuzzyRegionSelector((Player) actor, world, maskOpt);
actor.print(BBC.SEL_FUZZY.s());
actor.print(BBC.SEL_LIST.s());
actor.print(TranslatableComponent.of("fawe.selection.sel.fuzzy"));
actor.print(TranslatableComponent.of("fawe.selection.sel.list"));
break;
case LIST:
default:

Datei anzeigen

@ -22,6 +22,7 @@
package com.sk89q.worldedit.command;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
@ -260,7 +261,7 @@ public class SnapshotCommands {
public Component getComponent(int number) {
final Snapshot snapshot = snapshots.get(number);
return TextComponent.of(number + 1 + ". ", TextColor.GOLD)
.append(TextComponent.of(snapshot.getName(), TextColor.LIGHT_PURPLE)
.append(TextComponent.of(snapshot.getName(), TextColor.GRAY)
.hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TextComponent.of("Click to use")))
.clickEvent(ClickEvent.of(ClickEvent.Action.RUN_COMMAND, "/snap use " + snapshot.getName())));
}

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
import com.google.common.collect.Collections2;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.InspectBrush;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.BrushSettings;
import com.boydti.fawe.object.brush.TargetMode;
import com.boydti.fawe.object.brush.scroll.Scroll;
@ -79,7 +80,7 @@ public class ToolUtilCommands {
throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
if (maskOpt == null) {
@ -109,7 +110,7 @@ public class ToolUtilCommands {
Arguments arguments) throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
if (pattern == null) {
@ -158,7 +159,7 @@ public class ToolUtilCommands {
)
public void none(Player player, LocalSession session) throws WorldEditException {
session.setTool(player, null);
player.print(BBC.TOOL_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.none"));
}
@Command(
@ -258,13 +259,13 @@ public class ToolUtilCommands {
throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
VisualMode[] modes = VisualMode.values();
VisualMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
tool.setVisualMode(player, newMode);
BBC.BRUSH_VISUAL_MODE_SET.send(player, newMode);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.visual.mode.set" , newMode));
}
@Command(
@ -277,13 +278,13 @@ public class ToolUtilCommands {
@Arg(name = "mode", desc = "int", def = "0") int mode) throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
TargetMode[] modes = TargetMode.values();
TargetMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
tool.setTargetMode(newMode);
BBC.BRUSH_TARGET_MODE_SET.send(player, newMode);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.target.mode.set" , newMode));
}
@Command(
@ -296,11 +297,11 @@ public class ToolUtilCommands {
int offset) throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
tool.setTargetOffset(offset);
BBC.BRUSH_TARGET_OFFSET_SET.send(player, offset);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.target.offset.set" , offset));
}
@Command(
@ -317,7 +318,7 @@ public class ToolUtilCommands {
List<String> commandStr) throws WorldEditException {
BrushTool bt = session.getBrushTool(player, false);
if (bt == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
@ -325,11 +326,11 @@ public class ToolUtilCommands {
Scroll action = Scroll.fromArguments(bt, player, session, mode, commandStr, true);
settings.setScrollAction(action);
if (mode == Scroll.Action.NONE) {
BBC.BRUSH_SCROLL_ACTION_UNSET.send(player);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.scroll.action.unset"));
} else if (action != null) {
String full = (mode.name().toLowerCase() + " " + StringMan.join(commandStr, " ")).trim();
settings.addSetting(BrushSettings.SettingType.SCROLL_ACTION, full);
BBC.BRUSH_SCROLL_ACTION_SET.send(player, mode);
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.scroll.action.set" , mode));
}
bt.update();
}
@ -351,11 +352,11 @@ public class ToolUtilCommands {
Arguments arguments) throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
if (maskArg == null) {
player.print(BBC.BRUSH_SOURCE_MASK_DISABLED.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.source.mask.disabled"));
tool.setSourceMask(null);
return;
}
@ -364,7 +365,7 @@ public class ToolUtilCommands {
settings.addSetting(BrushSettings.SettingType.SOURCE_MASK, lastArg);
settings.setSourceMask(maskArg);
tool.update();
player.print(BBC.BRUSH_SOURCE_MASK.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.source.mask"));
}
@Command(
@ -379,11 +380,11 @@ public class ToolUtilCommands {
Arguments arguments) throws WorldEditException {
BrushTool tool = session.getBrushTool(player, false);
if (tool == null) {
player.print(BBC.BRUSH_NONE.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
return;
}
if (transform == null) {
player.print(BBC.BRUSH_TRANSFORM_DISABLED.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.transform.disabled"));
tool.setTransform(null);
return;
}
@ -392,6 +393,6 @@ public class ToolUtilCommands {
settings.addSetting(BrushSettings.SettingType.TRANSFORM, lastArg);
settings.setTransform(transform);
tool.update();
player.print(BBC.BRUSH_TRANSFORM.s());
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.transform"));
}
}

Datei anzeigen

@ -23,6 +23,7 @@ import static com.sk89q.worldedit.command.util.Logging.LogMode.PLACEMENT;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.DelegateConsumer;
import com.boydti.fawe.object.function.QuadFunction;
@ -189,7 +190,7 @@ public class UtilityCommands {
@SkipQueue
public void cancel(Player player) {
int cancelled = player.cancel(false);
BBC.WORLDEDIT_CANCEL_COUNT.send(player, cancelled);
player.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.count" , cancelled));
}
@Command(
@ -696,7 +697,7 @@ public class UtilityCommands {
double result = expression.evaluate(
new double[]{}, WorldEdit.getInstance().getSessionManager().get(actor).getTimeout());
String formatted = Double.isNaN(result) ? "NaN" : formatForLocale(actor.getLocale()).format(result);
return SubtleFormat.wrap(input + " = ").append(TextComponent.of(formatted, TextColor.LIGHT_PURPLE));
return SubtleFormat.wrap(input + " = ").append(TextComponent.of(formatted, TextColor.GRAY));
}, (Component) null);
}
@ -708,7 +709,7 @@ public class UtilityCommands {
@CommandPermissions("fawe.confirm")
public void confirm(Player fp) throws WorldEditException {
if (!fp.confirm()) {
BBC.NOTHING_CONFIRMED.send(fp);
fp.print(TranslatableComponent.of("fawe.worldedit.utility.nothing.confirmed"));
}
}
@ -768,7 +769,7 @@ public class UtilityCommands {
getFiles(dir, actor, args, formatName, playerFolder, fileList::add);
if (fileList.isEmpty()) {
BBC.SCHEMATIC_NONE.send(actor);
actor.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"));
return Collections.emptyList();
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.FaweVersion;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.util.IncendoPaster;
import com.sk89q.worldedit.LocalSession;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalConfiguration;

Datei anzeigen

@ -28,6 +28,7 @@ import com.boydti.fawe.beta.implementation.IChunkExtent;
import com.boydti.fawe.beta.implementation.processors.NullProcessor;
import com.boydti.fawe.beta.implementation.processors.PersistentChunkSendProcessor;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.RunnableVal;
import com.boydti.fawe.object.brush.BrushSettings;
import com.boydti.fawe.object.brush.MovableTool;
@ -500,7 +501,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
if (brush == null) return false;
if (current.setWorld(player.getWorld().getName()) && !current.canUse(player)) {
BBC.NO_PERM.send(player, StringMan.join(current.getPermissions(), ","));
player.print(TranslatableComponent.of("fawe.error.no.perm" , StringMan.join(current.getPermissions(), ",")));
return false;
}
try (EditSession editSession = session.createEditSession(player)) {

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.entity.Player;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
import com.sk89q.worldedit.EditSession;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalConfiguration;

Datei anzeigen

@ -103,7 +103,7 @@ public final class AsyncCommandBuilder<T> {
public AsyncCommandBuilder<T> onSuccess(@Nullable String message, @Nullable Consumer<T> consumer) {
checkArgument(message != null || consumer != null, "Can't have null message AND consumer");
this.successMessage = message == null ? null : TextComponent.of(message, TextColor.LIGHT_PURPLE);
this.successMessage = message == null ? null : TextComponent.of(message, TextColor.GRAY);
this.consumer = consumer;
return this;
}

Datei anzeigen

@ -2,6 +2,7 @@ package com.sk89q.worldedit.command.util.annotation;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.util.task.InterruptableCondition;
import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.WorldEdit;
@ -47,7 +48,7 @@ public @interface Confirm {
BlockVector3 max = region.getMaximumPoint();
long area = (max.getX() - min.getX()) * (max.getZ() - min.getZ() + 1) * (int) value;
if (area > 2 << 18) {
BBC.WORLDEDIT_CANCEL_REASON_CONFIRM_REGION.send(actor, min, max, getArgs(context));
actor.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.confirm.region" , min, max, getArgs(context)));
return confirm(actor, context);
}
return true;
@ -58,7 +59,7 @@ public @interface Confirm {
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
int max = WorldEdit.getInstance().getConfiguration().maxRadius;
if (value > max) {
BBC.WORLDEDIT_CANCEL_REASON_CONFIRM_REGION.send(actor, value, max, getArgs(context));
actor.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.confirm.region" , value, max, getArgs(context)));
return Processor.confirm(actor, context);
}
return true;
@ -69,7 +70,7 @@ public @interface Confirm {
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
int max = 50;// TODO configurable, get Key.of(Method.class) @Limit
if (value > max) {
BBC.WORLDEDIT_CANCEL_REASON_CONFIRM_REGION.send(actor, value, max, getArgs(context));
actor.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.confirm.region" , value, max, getArgs(context)));
return Processor.confirm(actor, context);
}
return true;
@ -78,7 +79,7 @@ public @interface Confirm {
ALWAYS {
@Override
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
BBC.WORLDEDIT_CANCEL_REASON_CONFIRM.send(actor);
actor.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.confirm"));
return confirm(actor, context);
}
}

Datei anzeigen

@ -45,6 +45,7 @@ import com.sk89q.worldedit.session.request.Request;
import com.sk89q.worldedit.util.Direction;
import com.sk89q.worldedit.util.HandSide;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockStateHolder;
@ -375,7 +376,7 @@ public interface Player extends Entity, Actor {
}
}
void sendTitle(String title, String sub);
void sendTitle(Component title, Component sub);
/**
* Loads any history items from disk: - Should already be called if history on disk is enabled

Datei anzeigen

@ -23,6 +23,7 @@ import com.google.common.collect.Maps;
import com.boydti.fawe.command.SuggestInputParseException;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.jnbt.JSON2NBT;
import com.boydti.fawe.jnbt.NBTException;
import com.boydti.fawe.util.MathMan;
@ -424,7 +425,7 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
if (context.isRestricted()) {
Actor actor = context.requireActor();
if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().checkDisallowedBlocks(holder)) {
throw new DisallowedUsageException(BBC.BLOCK_NOT_ALLOWED + " '" + holder + "'");
throw new DisallowedUsageException(TranslatableComponent.of("fawe.error.block.not.allowed") + " '" + holder + "'");
}
CompoundTag nbt = holder.getNbtData();
if (nbt != null) {
@ -435,4 +436,4 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
}
return holder;
}
}
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.extension.factory.parser.mask;
import com.boydti.fawe.command.FaweParser;
import com.boydti.fawe.command.SuggestInputParseException;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.util.StringMan;
import com.google.common.collect.Iterables;
import com.sk89q.minecraft.util.commands.CommandException;
@ -149,7 +150,7 @@ public class DefaultMaskParser extends FaweParser<Mask> {
input = input.substring(input.indexOf(char0) + 1);
mask = parseFromInput(char0 + "[" + input + "]", context);
if (actor != null) {
BBC.COMMAND_CLARIFYING_BRACKET.send(actor, char0 + "[" + input + "]");
actor.print(TranslatableComponent.of("fawe.worldedit.help.command.clarifying.bracket" , char0 + "[" + input + "]"));
}
return mask;
}

Datei anzeigen

@ -75,7 +75,7 @@ public abstract class AbstractNonPlayerActor implements Actor {
} else {
FaweException fe = FaweException.get(throwable);
if (fe != null) {
printError(fe.getMessage());
printError(fe.getComponent());
} else {
throwable.printStackTrace();
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.extension.platform;
import com.sk89q.worldedit.EditSession;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.exception.FaweException;
import com.boydti.fawe.object.task.SimpleAsyncNotifyQueue;
import com.boydti.fawe.regions.FaweMaskManager;
@ -111,7 +112,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
} else {
FaweException fe = FaweException.get(throwable);
if (fe != null) {
printError(fe.getMessage());
printError(fe.getComponent());
} else {
throwable.printStackTrace();
}

Datei anzeigen

@ -21,6 +21,7 @@ package com.sk89q.worldedit.extension.platform;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.brush.visualization.VirtualWorld;
@ -120,7 +121,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
* @param component The component to print
*/
default void printInfo(Component component) {
print(component.color(TextColor.LIGHT_PURPLE));
print(component.color(TextColor.GRAY));
}
/**

Datei anzeigen

@ -25,6 +25,7 @@ import com.boydti.fawe.command.AnvilCommandsRegistration;
import com.boydti.fawe.command.CFICommands;
import com.boydti.fawe.command.CFICommandsRegistration;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
import com.boydti.fawe.object.changeset.CFIChangeSet;
@ -736,7 +737,7 @@ public final class PlatformCommandManager {
actor.print(e.getRichMessage());
}
} catch (FaweException e) {
actor.printError("Edit cancelled: " + e.getMessage());
actor.printError(TextComponent.builder().append("Edit cancelled: ").append(e.getComponent()).build());
} catch (UsageException e) {
ImmutableList<Command> cmd = e.getCommands();
if (!cmd.isEmpty()) {

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.extension.platform;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.brush.visualization.VirtualWorld;
import com.boydti.fawe.object.exception.FaweException;
import com.boydti.fawe.object.pattern.PatternTraverser;
@ -42,6 +43,7 @@ import com.sk89q.worldedit.event.platform.Interaction;
import com.sk89q.worldedit.event.platform.PlatformInitializeEvent;
import com.sk89q.worldedit.event.platform.PlatformReadyEvent;
import com.sk89q.worldedit.event.platform.PlayerInputEvent;
import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.session.request.Request;
import com.sk89q.worldedit.util.HandSide;
import com.sk89q.worldedit.util.Location;
@ -384,7 +386,7 @@ public class PlatformManager {
public void handleThrowable(Throwable e, Actor actor) {
FaweException faweException = FaweException.get(e);
if (faweException != null) {
BBC.WORLDEDIT_CANCEL_REASON.send(actor, faweException.getMessage());
actor.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason" , faweException.getComponent()));
} else {
actor.printError("Please report this error: [See console]");
actor.printRaw(e.getClass().getName() + ": " + e.getMessage());
@ -436,7 +438,7 @@ public class PlatformManager {
} catch (Throwable e) {
FaweException faweException = FaweException.get(e);
if (faweException != null) {
BBC.WORLDEDIT_CANCEL_REASON.send(player, faweException.getMessage());
player.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason" , faweException.getComponent()));
} else {
player.printError("Please report this error: [See console]");
player.printRaw(e.getClass().getName() + ": " + e.getMessage());

Datei anzeigen

@ -217,7 +217,7 @@ public class PlayerProxy extends AbstractPlayerActor {
}
@Override
public void sendTitle(String title, String sub) {
public void sendTitle(Component title, Component sub) {
basePlayer.sendTitle(title, sub);
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.extent.clipboard.io;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.clipboard.LazyClipboardHolder;
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
@ -170,7 +171,7 @@ public class ClipboardFormats {
LocalConfiguration config = worldEdit.getConfiguration();
if (input.startsWith("url:")) {
if (!player.hasPermission("worldedit.schematic.load.web")) {
if (message) BBC.NO_PERM.send(player, "worldedit.schematic.load.web");
if (message) player.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.load.web"));
return null;
}
URL base = new URL(Settings.IMP.WEB.URL);
@ -178,19 +179,19 @@ public class ClipboardFormats {
}
if (input.startsWith("http")) {
if (!player.hasPermission("worldedit.schematic.load.asset")) {
if (message) BBC.NO_PERM.send(player, "worldedit.schematic.load.asset");
if (message) player.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.load.asset"));
return null;
}
URL url = new URL(input);
URL webInterface = new URL(Settings.IMP.WEB.ASSETS);
if (!url.getHost().equalsIgnoreCase(webInterface.getHost())) {
if (message) BBC.WEB_UNAUTHORIZED.send(player, url);
if (message) player.print(TranslatableComponent.of("fawe.error.web.unauthorized", url));
return null;
}
return loadAllFromUrl(url);
} else {
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && Pattern.compile("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}").matcher(input).find() && !player.hasPermission("worldedit.schematic.load.other")) {
BBC.NO_PERM.send(player, "worldedit.schematic.load.other");
player.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.load.other"));
return null;
}
File working = worldEdit.getWorkingDirectoryFile(config.saveDir);
@ -210,7 +211,7 @@ public class ClipboardFormats {
}
} else {
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && Pattern.compile("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}").matcher(input).find() && !player.hasPermission("worldedit.schematic.load.other")) {
if (message) BBC.NO_PERM.send(player, "worldedit.schematic.load.other");
if (message) player.print(TranslatableComponent.of("fawe.error.no.perm", "worldedit.schematic.load.other"));
return null;
}
if (format == null && input.matches(".*\\.[\\w].*")) {
@ -232,12 +233,12 @@ public class ClipboardFormats {
if (format == null && f.isFile()) {
format = findByFile(f);
if (format == null) {
BBC.CLIPBOARD_INVALID_FORMAT.send(player, f.getName());
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.invalid.format" , f.getName()));
return null;
}
}
if (!f.exists()) {
if (message) BBC.SCHEMATIC_NOT_FOUND.send(player, input);
if (message) player.print(TranslatableComponent.of("fawe.error.schematic.not.found" , input));
return null;
}
if (!f.isDirectory()) {
@ -247,7 +248,7 @@ public class ClipboardFormats {
}
URIClipboardHolder[] clipboards = loadAllFromDirectory(f);
if (clipboards.length < 1) {
if (message) BBC.SCHEMATIC_NOT_FOUND.send(player, input);
if (message) player.print(TranslatableComponent.of("fawe.error.schematic.not.found" , input));
return null;
}
return new MultiClipboardHolder(f.toURI(), clipboards);

Datei anzeigen

@ -196,7 +196,7 @@ public class Deform implements Contextual<Operation> {
@Override
public Iterable<Component> getStatusMessages() {
return Lists.newArrayList(TranslatableComponent.of("worldedit.operation.deform.expression",
TextComponent.of(expression).color(TextColor.LIGHT_PURPLE)));
TextComponent.of(expression).color(TextColor.GRAY)));
}
}

Datei anzeigen

@ -430,11 +430,11 @@ public class ForwardExtentCopy implements Operation {
public Iterable<Component> getStatusMessages() {
List<Component> messages = new ArrayList<>();
messages.add(TranslatableComponent.of("worldedit.operation.affected.block",
TextComponent.of(affectedBlocks)).color(TextColor.LIGHT_PURPLE));
TextComponent.of(affectedBlocks)).color(TextColor.GRAY));
messages.add(TranslatableComponent.of("worldedit.operation.affected.biome",
TextComponent.of(affectedBiomeCols)).color(TextColor.LIGHT_PURPLE));
TextComponent.of(affectedBiomeCols)).color(TextColor.GRAY));
messages.add(TranslatableComponent.of("worldedit.operation.affected.entity",
TextComponent.of(affectedEntities)).color(TextColor.LIGHT_PURPLE));
TextComponent.of(affectedEntities)).color(TextColor.GRAY));
return messages;
}

Datei anzeigen

@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.Lists;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.boydti.fawe.object.collection.BlockVectorSet;
import com.google.common.collect.Sets;
import com.sk89q.worldedit.WorldEditException;
@ -283,7 +284,7 @@ public abstract class BreadthFirstSearch implements Operation {
return Lists.newArrayList(TranslatableComponent.of(
"worldedit.operation.affected.block",
TextComponent.of(getAffected())
).color(TextColor.LIGHT_PURPLE));
).color(TextColor.GRAY));
}
}

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.function.visitor;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import static com.google.common.base.Preconditions.checkNotNull;
@ -88,7 +89,7 @@ public class EntityVisitor implements Operation {
return Lists.newArrayList(TranslatableComponent.of(
"worldedit.operation.affected.entity",
TextComponent.of(getAffected())
).color(TextColor.LIGHT_PURPLE));
).color(TextColor.GRAY));
}
}

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.function.visitor;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.WorldEditException;
@ -87,7 +88,7 @@ public class FlatRegionVisitor implements Operation {
return Lists.newArrayList(TranslatableComponent.of(
"worldedit.operation.affected.column",
TextComponent.of(getAffected())
).color(TextColor.LIGHT_PURPLE));
).color(TextColor.GRAY));
}
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.function.visitor;
import com.google.common.collect.Lists;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.function.operation.Operation;
@ -99,7 +100,7 @@ public class RegionVisitor implements Operation {
return Lists.newArrayList(TranslatableComponent.of(
"worldedit.operation.affected.block",
TextComponent.of(getAffected())
).color(TextColor.LIGHT_PURPLE));
).color(TextColor.GRAY));
}
}

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.regions.selector;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.extension.platform.Actor;

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.regions.selector;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.extension.platform.Actor;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.regions.selector;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import static com.google.common.base.Preconditions.checkNotNull;

Datei anzeigen

@ -20,6 +20,7 @@
package com.sk89q.worldedit.regions.selector;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.math.BlockVector3;

Datei anzeigen

@ -22,6 +22,7 @@ package com.sk89q.worldedit.regions.selector;
import static com.google.common.base.Preconditions.checkNotNull;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.extension.platform.Actor;

Datei anzeigen

@ -0,0 +1,140 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.sk89q.worldedit.util.formatting.text;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponentImpl.BuilderImpl;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.format.TextDecoration;
import org.jetbrains.annotations.Nullable;
import javax.annotation.Nonnull;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
public interface TranslatableComponent extends BuildableComponent<TranslatableComponent, TranslatableComponent.Builder>, ScopedComponent<TranslatableComponent> {
@Nonnull
static TranslatableComponent.Builder builder() {
return new BuilderImpl();
}
@Nonnull
static TranslatableComponent.Builder builder(@Nonnull final String key) {
return builder().key(key);
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key) {
return (TranslatableComponent)builder(key).build();
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color) {
return (TranslatableComponent)((TranslatableComponent.Builder)builder(key).color(color)).build();
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color, @Nonnull final TextDecoration... decorations) {
Set<TextDecoration> activeDecorations = new HashSet(decorations.length);
Collections.addAll(activeDecorations, decorations);
return of(key, color, (Set)activeDecorations);
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color, @Nonnull final Set<TextDecoration> decorations) {
return (TranslatableComponent)((TranslatableComponent.Builder)((TranslatableComponent.Builder)builder(key).color(color)).decorations(decorations, true)).build();
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, final Component... args) {
return of(key, (TextColor)null, (Component[])args);
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color, final Component... args) {
return of(key, color, Collections.emptySet(), args);
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color, @Nonnull final Set<TextDecoration> decorations, final Component... args) {
return of(key, color, decorations, Arrays.asList(args));
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nonnull final List<? extends Component> args) {
return of(key, (TextColor)null, (List)args);
}
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color, @Nonnull final List<? extends Component> args) {
return of(key, color, Collections.emptySet(), args);
}
@Nonnull
static TranslatableComponent of(@Nonnull final String key, @Nullable final TextColor color, @Nonnull final Set<TextDecoration> decorations, @Nonnull final List<? extends Component> args) {
return (TranslatableComponent)((TranslatableComponent.Builder)((TranslatableComponent.Builder)builder(key).color(color)).decorations(decorations, true)).args(args).build();
}
@Nonnull
static TranslatableComponent make(@Nonnull final Consumer<? super TranslatableComponent.Builder> consumer) {
TranslatableComponent.Builder builder = builder();
consumer.accept(builder);
return (TranslatableComponent)builder.build();
}
@Nonnull
static TranslatableComponent make(@Nonnull final String key, @Nonnull final Consumer<? super TranslatableComponent.Builder> consumer) {
TranslatableComponent.Builder builder = builder(key);
consumer.accept(builder);
return (TranslatableComponent)builder.build();
}
@Nonnull
static TranslatableComponent make(@Nonnull final String key, @Nonnull final List<? extends Component> args, @Nonnull final Consumer<? super TranslatableComponent.Builder> consumer) {
TranslatableComponent.Builder builder = builder(key).args(args);
consumer.accept(builder);
return (TranslatableComponent)builder.build();
}
@Nonnull
String key();
@Nonnull
TranslatableComponent key(@Nonnull final String key);
@Nonnull
List<Component> args();
@Nonnull
TranslatableComponent args(@Nonnull final List<? extends Component> args);
public interface Builder extends ComponentBuilder<TranslatableComponent, TranslatableComponent.Builder> {
@Nonnull
TranslatableComponent.Builder key(@Nonnull final String key);
@Nonnull
TranslatableComponent.Builder args(final ComponentBuilder... args);
@Nonnull
TranslatableComponent.Builder args(final Component... args);
@Nonnull
TranslatableComponent.Builder args(@Nonnull final List<? extends Component> args);
}
// FAWE added
@Nonnull
static TranslatableComponent of(@Nonnull final String key, final Object... args) {
List<Component> components = Arrays.stream(args)
.map(arg -> arg instanceof Component ? (Component) arg : TextComponent.of(Objects.toString(arg)))
.collect(Collectors.toList());
return of(key, components);
}
}

Datei anzeigen

@ -1,4 +1,339 @@
{
"fawe.prefix": "&8(&4&lFAWE&8)&7 ",
"piston.style.help.text": "Help: {0}",
"piston.style.text.modifier": "TODO modifier: {0}, {1}, {2}",
"piston.style.main.text": "{0}",
"piston.style.part.wrapping": "&8{0}&e{1}&8{2}",
"piston.text.command.prefix": "TODO prefix",
"fawe.info.prefix": "&4&lFAWE&7: ",
"fawe.info.file.deleted": "{0} has been deleted.",
"fawe.info.schematic.pasting": "&7The schematic is pasting. This cannot be undone.",
"fawe.info.lighting.propagate.selection": "Lighting has been propogated in {0} chunks. (Note: To remove light use //removelight)",
"fawe.info.updated.lighting.selection": "Lighting has been updated in {0} chunks. (It may take a second for the packets to send)",
"fawe.info.set.region": "Selection set to your current allowed region",
"fawe.info.worldedit.command.limit": "Please wait until your current action completes",
"fawe.info.worldedit.delayed": "Please wait while we process your FAWE action...",
"fawe.info.worldedit.run": "Apologies for the delay. Now executing: {0}",
"fawe.info.worldedit.complete": "Edit completed.",
"fawe.info.require.selection.in.mask": "&7{0} of your selection is not within your mask. You can only make edits within allowed regions.",
"fawe.info.worldedit.volume": "&7You cannot select a volume of {0}. The maximum volume you can modify is {1}.",
"fawe.info.worldedit.iterations": "You cannot iterate {0} times. The maximum number of iterations allowed is {1}.",
"fawe.info.worldedit.unsafe": "&7Access to that command has been blocked",
"fawe.info.worldedit.dangerous.worldedit": "&cProcessed unsafe edit at {0} by {1}",
"fawe.error.worldedit.extend": "&cYour edit may have extended outside your allowed region.",
"fawe.info.worldedit.toggle.tips.on": "Disabled FAWE tips.",
"fawe.info.worldedit.toggle.tips.off": "Enabled FAWE tips.",
"fawe.info.worldedit.bypassed": "Currently bypassing FAWE restriction.",
"fawe.info.worldedit.unmasked": "&6Your FAWE edits are now unrestricted.",
"fawe.info.worldedit.restricted": "Your FAWE edits are now restricted.",
"fawe.info.worldedit.oom.admin": "Possible options:\n - //fast\n - Do smaller edits\n - Allocate more memory\n - Disable `max-memory-percent`",
"fawe.info.compressed": "History compressed. Saved ~ {0}b ({1}x smaller)",
"fawe.error.web.unauthorized": "Only links from the configured web host is allowed: {0}",
"fawe.info.action.complete": "Action completed in {0} seconds",
"fawe.web.generating.link": "Uploading {0}, please wait...",
"fawe.web.generating.link.failed": "Failed to generate download link!",
"fawe.web.download.link": "{0}",
"fawe.worldedit.general.mask.disabled": "Global mask disabled",
"fawe.worldedit.general.mask": "Global mask set",
"fawe.worldedit.general.texture.disabled": "Texturing reset",
"fawe.worldedit.general.texture.set": "Set texturing to {1}",
"fawe.worldedit.general.source.mask.disabled": "Global source mask disabled",
"fawe.worldedit.general.source.mask": "Global source mask set",
"fawe.worldedit.general.transform.disabled": "Global transform disabled",
"fawe.worldedit.general.transform": "Global transform set",
"fawe.worldedit.copy.command.copy": "{0} blocks were copied.",
"fawe.worldedit.cut.command.cut.slow": "{0} blocks were cut.",
"fawe.worldedit.cut.command.cut.lazy": "{0} blocks will be removed on paste",
"fawe.worldedit.paste.command.paste": "The clipboard has been pasted at {0}",
"fawe.worldedit.rotate.command.rotate": "The clipboard has been rotated",
"fawe.worldedit.flip.command.flipped": "The clipboard has been flipped",
"fawe.worldedit.regen.command.regen.0": "Region regenerated.",
"fawe.worldedit.regen.command.regen.1": "Region regenerated.",
"fawe.worldedit.regen.command.regen.2": "Region regenerated.",
"fawe.worldedit.tree.command.tree": "{0} trees created.",
"fawe.worldedit.tree.command.pumpkin": "{0} pumpkin patches created.",
"fawe.worldedit.flora.command.flora": "{0} flora created.",
"fawe.worldedit.history.command.history.clear": "History cleared",
"fawe.worldedit.history.command.redo.error": "Nothing left to redo. (See also `/inspect` and `/frb`)",
"fawe.worldedit.history.command.history.other.error": "Unable to find session for {0}.",
"fawe.worldedit.history.command.redo.success": "Redo successful{0}.",
"fawe.worldedit.history.command.undo.error": "Nothing left to undo. (See also `/inspect` and `/frb`)",
"fawe.worldedit.history.command.undo.disabled": "Undo disabled, use: //fast",
"fawe.worldedit.history.command.undo.success": "Undo successful{0}.",
"fawe.worldedit.operation.operation": "Operation queued ({0})",
"fawe.worldedit.selection.selection.wand": "Left click: select pos #1; Right click: select pos #2",
"fawe.worldedit.navigation.navigation.wand.error": "Nothing to pass through",
"fawe.worldedit.selection.selection.wand.disable": "Edit wand disabled.",
"fawe.worldedit.selection.selection.wand.enable": "Edit wand enabled.",
"fawe.worldedit.selection.selection.chunk": "Chunk selected ({0})",
"fawe.worldedit.selection.selection.chunks": "Chunks selected ({0}) - ({1})",
"fawe.worldedit.selection.selection.contract": "Region contracted {0} blocks.",
"fawe.worldedit.selection.selection.count": "Counted {0} blocks.",
"fawe.worldedit.selection.selection.distr": "# total blocks: {0}",
"fawe.worldedit.selection.selection.expand": "Region expanded {0} blocks",
"fawe.worldedit.selection.selection.expand.vert": "Region expanded {0} blocks (top to bottom)",
"fawe.worldedit.selection.selection.inset": "Region inset",
"fawe.worldedit.selection.selection.outset": "Region outset",
"fawe.worldedit.selection.selection.shift": "Region shifted",
"fawe.worldedit.selection.selection.cleared": "Selection cleared",
"fawe.worldedit.anvil.world.is.loaded": "The world shouldn't be in use when executing. Unload the world, or use use -f to override (save first)",
"fawe.worldedit.brush.brush.reset": "Reset your brush. (SHIFT + Click)",
"fawe.worldedit.brush.brush.none": "You aren't holding a brush!",
"fawe.worldedit.brush.brush.scroll.action.set": "Set scroll action to {0}",
"fawe.worldedit.brush.brush.scroll.action.unset": "Removed scroll action",
"fawe.worldedit.brush.brush.visual.mode.set": "Set visual mode to {0}",
"fawe.worldedit.brush.brush.target.mode.set": "Set target mode to {0}",
"fawe.worldedit.brush.brush.target.mask.set": "Set target mask to {0}",
"fawe.worldedit.brush.brush.target.offset.set": "Set target offset to {0}",
"fawe.worldedit.brush.brush.equipped": "Equipped brush {0}",
"fawe.worldedit.brush.brush.try.other": "There are other more suitable brushes e.g.,\n - //br height [radius=5] [#clipboard|file=null] [rotation=0] [yscale=1.00]",
"fawe.worldedit.brush.brush.copy": "Left click the base of an object to copy, right click to paste. Increase the brush radius if necessary.",
"fawe.worldedit.brush.brush.height.invalid": "Invalid height map file ({0})",
"fawe.worldedit.brush.brush.smooth": "Note: Use the blend brush if you want to smooth overhangs or caves.",
"fawe.worldedit.brush.brush.spline": "Click to add a point, click the same spot to finish",
"fawe.worldedit.brush.brush.line.primary": "Added point {0}, click another position to create the line",
"fawe.worldedit.brush.brush.catenary.direction": "Added point {0}, click the direction you want to create the spline",
"fawe.worldedit.brush.brush.line.secondary": "Created spline",
"fawe.worldedit.brush.brush.spline.primary.2": "Added position, Click the same spot to join!",
"fawe.worldedit.brush.brush.spline.secondary.error": "Not enough positions set!",
"fawe.worldedit.brush.brush.spline.secondary": "Created spline",
"fawe.worldedit.brush.brush.size": "Brush size set",
"fawe.worldedit.brush.brush.range": "Brush size set",
"fawe.worldedit.brush.brush.mask.disabled": "Brush mask disabled",
"fawe.worldedit.brush.brush.mask": "Brush mask set",
"fawe.worldedit.brush.brush.source.mask.disabled": "Brush source mask disabled",
"fawe.worldedit.brush.brush.source.mask": "Brush source mask set",
"fawe.worldedit.brush.brush.transform.disabled": "Brush transform disabled",
"fawe.worldedit.brush.brush.transform": "Brush transform set",
"fawe.worldedit.brush.brush.material": "Brush material set",
"fawe.worldedit.rollback.rollback.element": "Undoing {0}",
"fawe.worldedit.tool.tool.inspect": "Inspect tool bound to {0}.",
"fawe.worldedit.tool.tool.inspect.info": "{0} changed {1} to {2} {3} ago",
"fawe.worldedit.tool.tool.inspect.info.footer": "Total: {0} changes",
"fawe.worldedit.tool.tool.none": "Tool unbound from your current item.",
"fawe.worldedit.tool.tool.info": "Info tool bound to {0}.",
"fawe.worldedit.tool.tool.tree": "Tree tool bound to {0}.",
"fawe.worldedit.tool.tool.tree.error.block": "A tree can't go here",
"fawe.worldedit.tool.tool.tree.error": "Tree type {0} is unknown.",
"fawe.worldedit.tool.tool.repl": "Block replacer tool bound to {0}.",
"fawe.worldedit.tool.tool.cycler": "Block data cycler tool bound to {0}.",
"fawe.worldedit.tool.tool.flood.fill": "Block flood fill tool bound to {0}.",
"fawe.worldedit.tool.tool.range.error": "Maximum range: {0}.",
"fawe.worldedit.tool.tool.radius.error": "Maximum allowed brush radius: {0}.",
"fawe.worldedit.tool.tool.deltree": "Floating tree remover tool bound to {0}.",
"fawe.worldedit.tool.tool.deltree.error": "That's not a tree",
"fawe.worldedit.tool.tool.deltree.floating.error": "That's not a floating tree",
"fawe.worldedit.tool.tool.farwand": "Far wand tool bound to {0}.",
"fawe.worldedit.tool.tool.lrbuild.bound": "Long-range building tool bound to {0}.",
"fawe.worldedit.tool.tool.lrbuild.info": "Left-click set to {0}; right-click set to {1}.",
"fawe.worldedit.tool.superpickaxe.enabled": "Super Pickaxe enabled.",
"fawe.worldedit.tool.superpickaxe.disabled": "Super Pickaxe disabled.",
"fawe.worldedit.tool.superpickaxe.area.enabled": "Mode changed. Left click with a pickaxe. // to disable.",
"fawe.worldedit.snapshot.snapshot.loaded": "Snapshot '{0}' loaded; now restoring...",
"fawe.worldedit.snapshot.snapshot.set": "Snapshot set to: {0}",
"fawe.worldedit.snapshot.snapshot.newest": "Now using newest snapshot.",
"fawe.worldedit.snapshot.snapshot.list.header": "Snapshots for world ({0}):",
"fawe.worldedit.snapshot.snapshot.list.footer": "Use /snap use [snapshot] or /snap use latest.",
"fawe.worldedit.snapshot.snapshot.not.configured": "Snapshot/backup restore is not configured.",
"fawe.worldedit.snapshot.snapshot.not.available": "No snapshots are available. See console for details.",
"fawe.worldedit.snapshot.snapshot.not.found.world": "No snapshots were found for this world.",
"fawe.worldedit.snapshot.snapshot.not.found": "No snapshots were found.",
"fawe.worldedit.snapshot.snapshot.invalid.index": "Invalid index, must be equal or higher then 1.",
"fawe.worldedit.snapshot.snapshot.error.date": "Could not detect the date inputted.",
"fawe.worldedit.snapshot.snapshot.error.restore": "Errors prevented any blocks from being restored.",
"fawe.worldedit.snapshot.snapshot.error.restore.chunks": "No chunks could be loaded. (Bad archive?)",
"fawe.worldedit.biome.biome.list.header": "Biomes (page {0}/{1}):",
"fawe.worldedit.biome.biome.changed": "Biomes were changed in {0} columns.",
"fawe.worldedit.general.fast.enabled": "Fast mode enabled. History and edit restrictions will be bypassed.",
"fawe.worldedit.general.fast.disabled": "Fast mode disabled",
"fawe.worldedit.general.place.enabled": "Now placing at pos #1.",
"fawe.worldedit.general.place.disabled": "Now placing at the block you stand in.",
"fawe.worldedit.utility.kill.success": "Killed {0} entities in a radius of {1}.",
"fawe.worldedit.utility.nothing.confirmed": "You have no actions pending confirmation.",
"fawe.worldedit.schematic.schematic.prompt.clear": "You may want to use {0} to clear your current clipboard first",
"fawe.worldedit.schematic.schematic.show": "Displaying {0} schematics from {1}:\n - Left click a structure to set your clipboard\n - Right click to add a structure to your multi-clipboard\n - Use {2} to go back to the world",
"fawe.worldedit.schematic.schematic.format": "Available formats (Name: Lookup names)",
"fawe.worldedit.schematic.schematic.move.exists": "{0} already exists",
"fawe.worldedit.schematic.schematic.move.success": "{0} -> {1}",
"fawe.worldedit.schematic.schematic.move.failed": "{0} no moved: {1}",
"fawe.worldedit.schematic.schematic.loaded": "{0} loaded. Paste it with //paste",
"fawe.worldedit.schematic.schematic.saved": "{0} saved.",
"fawe.worldedit.schematic.schematic.page": "Page must be {0}",
"fawe.worldedit.schematic.schematic.none": "No files found.",
"fawe.worldedit.schematic.schematic.list": "Available files (Filename: Format) [{0}/{1}]:",
"fawe.worldedit.schematic.schematic.list.elem": " - {0} - {1}",
"fawe.worldedit.clipboard.clipboard.uri.not.found": "You do not have {0} loaded",
"fawe.worldedit.clipboard.clipboard.cleared": "Clipboard cleared",
"fawe.worldedit.clipboard.clipboard.invalid.format": "Unknown clipboard format: {0}",
"fawe.worldedit.visitor.visitor.block": "{0} blocks affected",
"fawe.worldedit.visitor.visitor.entity": "{0} entities affected",
"fawe.worldedit.visitor.visitor.flat": "{0} columns affected",
"fawe.worldedit.selector.selector.fuzzy.pos1": "Region set and expanded from {0} {1}.",
"fawe.worldedit.selector.selector.fuzzy.pos2": "Added expansion of {0} {1}.",
"fawe.worldedit.selector.selector.pos": "pos{0} set to {1} ({2}).",
"fawe.worldedit.selector.selector.center": "Center set to {0} ({1}).",
"fawe.worldedit.selector.selector.radius": "Radius set to {0} ({1}).",
"fawe.worldedit.selector.selector.expanded": "Expanded region to {0} ({1})",
"fawe.worldedit.selector.selector.invalid.coordinates": "Invalid coordinates {0}",
"fawe.worldedit.selector.selector.already.set": "Position already set.",
"fawe.worldedit.selector.selector.set.default": "Your default region selector is now {0}.",
"fawe.worldedit.timezone.timezone.set": "Timezone set for this session to: {0}",
"fawe.worldedit.timezone.timezone.display": "The current time in that timezone is: {0}",
"fawe.worldedit.cycler.block.cycler.cannot.cycle": "That block's data cannot be cycled!",
"fawe.worldedit.cycler.block.cycler.limit": "Max blocks change limit reached.",
"fawe.worldedit.cycler.block.cycler.no.perm": "You are not permitted to cycle the data value of that block.",
"fawe.worldedit.command.command.invalid.syntax": "The command was not used properly (no more help available).",
"fawe.worldedit.help.command.clarifying.bracket": "Added clarifying bracket for {0}",
"fawe.worldedit.help.help.suggest": "Couldn't find {0}. Maybe try one of {1} ?",
"fawe.worldedit.help.help.header.categories": "Command Types",
"fawe.worldedit.help.help.header.subcommands": "Subcommands",
"fawe.worldedit.help.help.header.command": "Help for: {0}",
"fawe.worldedit.help.help.item.allowed": "{0} - {1}",
"fawe.worldedit.help.help.item.denied": "{0} - {1}",
"fawe.worldedit.help.help.header": "Help: page {0}/{1}",
"fawe.worldedit.help.help.footer": "Wiki: https://git.io/vSKE5",
"fawe.worldedit.utility.page.footer": "Use {0} to go to the next page",
"fawe.progress.progress.message": "{1}/{0} ({2}%) @{3}cps {4}s left",
"fawe.progress.progress.finished": "[ Done! ]",
"fawe.error.command.syntax": "Usage: {0}",
"fawe.error.no.perm": "You are lacking the permission node: {0}",
"fawe.error.block.not.allowed": "You are not allowed to use",
"fawe.error.setting.disable": "Lacking setting: {0}",
"fawe.error.brush.not.found": "Available brushes: {0}",
"fawe.error.brush.incompatible": "Brush not compatible with this version",
"fawe.error.schematic.not.found": "Schematic not found: {0}",
"fawe.error.no.region": "You have no current allowed region",
"fawe.error.no.mask": "You have no current mask set",
"fawe.error.not.player": "You must be a player to perform this action!",
"fawe.error.player.not.found": "Player not found: {0}",
"fawe.error.oom": "[Critical] Detected low memory i.e. < 1%. We will take the following actions:\n - Terminate WE block placement\n - Clear WE history\n - Unload non essential chunks\n - Kill entities\n - Garbage collect\nIgnore this if trying to crash server.\nNote: Low memory is likely (but not necessarily) caused by WE",
"fawe.error.worldedit.some.fails": "{0} blocks weren't placed because they were outside your allowed region.",
"fawe.error.worldedit.some.fails.blockbag": "Missing blocks: {0}",
"fawe.cancel.worldedit.cancel.count": "Cancelled {0} edits.",
"fawe.cancel.worldedit.cancel.reason.confirm": "Use //confirm to execute {2}",
"fawe.cancel.worldedit.cancel.reason.confirm.region": "Your selection is large ({0} -> {1}, containing {3} blocks). Use //confirm to execute {2}",
"fawe.cancel.worldedit.cancel.reason": "Your WorldEdit action was cancelled: {0}.",
"fawe.cancel.worldedit.cancel.reason.manual": "Manual cancellation",
"fawe.cancel.worldedit.cancel.reason.low.memory": "Low memory",
"fawe.cancel.worldedit.cancel.reason.max.changes": "Too many blocks changed",
"fawe.cancel.worldedit.cancel.reason.max.checks": "Too many block checks",
"fawe.cancel.worldedit.cancel.reason.max.tiles": "Too many blockstates",
"fawe.cancel.worldedit.cancel.reason.max.entities": "Too many entities",
"fawe.cancel.worldedit.cancel.reason.max.iterations": "Max iterations",
"fawe.cancel.worldedit.cancel.reason.outside.level": "Outside world",
"fawe.cancel.worldedit.cancel.reason.outside.region": "Outside allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)",
"fawe.cancel.worldedit.cancel.reason.no.region": "No allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)",
"fawe.cancel.worldedit.failed.load.chunk": "Skipped loading chunk: {0};{1}. Try increasing chunk-wait.",
"fawe.navigation.ascend.fail": "No free spot above you found.",
"fawe.navigation.ascended.plural": "Ascended {0} levels.",
"fawe.navigation.ascended.singular": "Ascended a level.",
"fawe.navigation.unstuck": "There you go!",
"fawe.navigation.descend.fail": "No free spot below you found.",
"fawe.navigation.descend.plural": "Descended {0} levels.",
"fawe.navigation.descend.singular": "Descended a level.",
"fawe.navigation.whoosh": "Whoosh!",
"fawe.navigation.poof": "Poof!",
"fawe.navigation.thru.fail": "No free spot ahead of you found.",
"fawe.navigation.no.block": "No block in sight! (or too far)",
"fawe.navigation.up.fail": "You would hit something above you.",
"fawe.selection.sel.cuboid": "Cuboid: left click for point 1, right click for point 2",
"fawe.selection.sel.cuboid.extend": "Cuboid: left click for a starting point, right click to extend",
"fawe.selection.sel.2d.polygon": "2D polygon selector: Left/right click to add a point.",
"fawe.selection.sal.ellipsoid": "Ellipsoid selector: left click=center, right click to extend",
"fawe.selection.sel.sphere": "Sphere selector: left click=center, right click to set radius",
"fawe.selection.sel.cylindrical": "Cylindrical selector: Left click=center, right click to extend.",
"fawe.selection.sel.max": "{0} points maximum.",
"fawe.selection.sel.fuzzy": "Fuzzy selector: Left click to select all contingent blocks, right click to add. To select an air cavity, use //pos1.",
"fawe.selection.sel.convex.polyhedral": "Convex polyhedral selector: Left click=First vertex, right click to add more.",
"fawe.selection.sel.list": "For a list of selection types use: //sel list",
"fawe.selection.sel.modes": "Select one of the modes below:",
"fawe.worldedit.scripting.scripting.no.perm": "You do not have permission to execute this craft script",
"fawe.worldedit.scripting.scripting.cs": "Use /cs with a script name first.",
"fawe.worldedit.scripting.scripting.error": "An error occured while executing a craft script",
"fawe.tips.tip.sel.list": "Tip: See the different selection modes with //sel list",
"fawe.tips.tip.select.connected": "Tip: Select all connected blocks with //sel fuzzy",
"fawe.tips.tip.set.pos1": "Tip: Use pos1 as a pattern with //set pos1",
"fawe.tips.tip.farwand": "Tip: Select distant points with //farwand",
"fawe.tips.tip.discord": "Need help using FAWE? https://discord.gg/ngZCzbU",
"fawe.tips.tip.lazycut": "Tip: It is safer to use //lazycut",
"fawe.tips.tip.fast": "Tip: Set fast and without undo using //fast",
"fawe.tips.tip.cancel": "Tip: You can //cancel an edit in progress",
"fawe.tips.tip.mask": "Tip: Set a global destination mask with /gmask",
"fawe.tips.tip.mask.angle": "Tip: Replace upward slopes of 3-20 blocks using //replace /[-20][-3] bedrock",
"fawe.tips.tip.set.linear": "Tip: Set blocks linearly with //set #l3d[wood,bedrock]",
"fawe.tips.tip.surface.spread": "Tip: Spread a flat surface with //set #surfacespread[5][0][5][#existing]",
"fawe.tips.tip.set.hand": "Tip: Use your current hand with //set hand",
"fawe.tips.tip.replace.regex": "Tip: Replace using regex: //replace .*_log <pattern>",
"fawe.tips.tip.replace.regex.2": "Tip: Replace using regex: //replace .*stairs[facing=(north|south)] <pattern>",
"fawe.tips.tip.replace.regex.3": "Tip: Replace using operators: //replace water[level>2] sand",
"fawe.tips.tip.replace.regex.4": "Tip: Replace using operators: //replace true *[waterlogged=false]",
"fawe.tips.tip.replace.regex.5": "Tip: Replace using operators: //replace true *[level-=1]",
"fawe.tips.tip.replace.id": "Tip: Replace only the block id: //replace woodenstair #id[cobblestair]",
"fawe.tips.tip.replace.light": "Tip: Remove light sources with //replace #brightness[1][15] 0",
"fawe.tips.tip.tab.complete": "Tip: The replace command supports tab completion",
"fawe.tips.tip.flip": "Tip: Mirror with //flip",
"fawe.tips.tip.deform": "Tip: Reshape with //deform",
"fawe.tips.tip.transform": "Tip: Set a transform with //gtransform",
"fawe.tips.tip.copypaste": "Tip: Paste on click with //br copypaste",
"fawe.tips.tip.source.mask": "Tip: Set a source mask with /gsmask <mask>",
"fawe.tips.tip.replace.marker": "Tip: Replace a block with your full clipboard using //replace wool #fullcopy",
"fawe.tips.tip.paste": "Tip: Place with //paste",
"fawe.tips.tip.lazycopy": "Tip: lazycopy is faster",
"fawe.tips.tip.download": "Tip: Try out //download",
"fawe.tips.tip.rotate": "Tip: Orientate with //rotate",
"fawe.tips.tip.copy.pattern": "Tip: To use as a pattern try #copy",
"fawe.tips.tip.regen.0": "Tip: Use a biome with /regen [biome]",
"fawe.tips.tip.regen.1": "Tip: Use a seed with /regen [biome] [seed]",
"fawe.tips.tip.biome.pattern": "Tip: The #biome[forest] pattern can be used in any command",
"fawe.tips.tip.biome.mask": "Tip: Restrict to a biome with the `$jungle` mask",
"worldedit.expand.description.vert": "Vertically expand the selection to world limits.",
"worldedit.expand.expanded": "Region expanded {0} blocks",
"worldedit.expand.expanded.vert": "Region expanded {0} blocks (top-to-bottom).",