mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
fix compile
This commit is contained in:
parent
6f32783e52
commit
1341e38a90
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.bukkit;
|
package com.boydti.fawe.bukkit;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.object.FaweCommand;
|
import com.boydti.fawe.object.FaweCommand;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitBlockCommandSender;
|
import com.sk89q.worldedit.bukkit.BukkitBlockCommandSender;
|
||||||
|
@ -77,7 +77,7 @@ public class BukkitBlockCommandSender extends AbstractNonPlayerActor implements
|
|||||||
@Override
|
@Override
|
||||||
public void print(String msg) {
|
public void print(String msg) {
|
||||||
for (String part : msg.split("\n")) {
|
for (String part : msg.split("\n")) {
|
||||||
print(TextComponent.of(part, TextColor.LIGHT_PURPLE));
|
print(TextComponent.of(part, TextColor.GRAY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ package com.sk89q.worldedit.bukkit;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.bukkit.FaweBukkit;
|
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.config.Settings;
|
||||||
import com.boydti.fawe.object.RunnableVal;
|
import com.boydti.fawe.object.RunnableVal;
|
||||||
import com.boydti.fawe.util.TaskManager;
|
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.HandSide;
|
||||||
import com.sk89q.worldedit.util.formatting.WorldEditText;
|
import com.sk89q.worldedit.util.formatting.WorldEditText;
|
||||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
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.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.World;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import com.sk89q.worldedit.world.gamemode.GameMode;
|
import com.sk89q.worldedit.world.gamemode.GameMode;
|
||||||
@ -167,28 +175,25 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void print(String msg) {
|
public void print(String msg) {
|
||||||
for (String part : msg.split("\n")) {
|
print(LegacyComponentSerializer.legacy().deserialize("&7" + msg, '&'));
|
||||||
player.sendMessage("\u00A7d" + part);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void printDebug(String msg) {
|
public void printDebug(String msg) {
|
||||||
for (String part : msg.split("\n")) {
|
print(LegacyComponentSerializer.legacy().deserialize("&3" + msg, '&'));
|
||||||
player.sendMessage("\u00A77" + part);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void printError(String msg) {
|
public void printError(String msg) {
|
||||||
for (String part : msg.split("\n")) {
|
print(LegacyComponentSerializer.legacy().deserialize("&c" + msg, '&'));
|
||||||
player.sendMessage("\u00A7c" + part);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void print(Component component) {
|
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
|
@Override
|
||||||
@ -366,10 +371,10 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendTitle(String title, String sub) {
|
public void sendTitle(Component title, Component sub) {
|
||||||
player.sendTitle(ChatColor.GOLD + title, ChatColor.GOLD + sub, 0, 70, 20);
|
String titleStr = WorldEditText.reduceToText(title, getLocale());
|
||||||
Bukkit.getServer().dispatchCommand(player, "title " + getName() + " subtitle [{\"text\":\"" + sub + "\",\"color\":\"gold\"}]");
|
String subStr = WorldEditText.reduceToText(sub, getLocale());
|
||||||
Bukkit.getServer().dispatchCommand(player, "title " + getName() + " title [{\"text\":\"" + title + "\",\"color\":\"gold\"}]");
|
player.sendTitle(titleStr, subStr, 0, 70, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,6 +2,7 @@ package com.boydti.fawe;
|
|||||||
|
|
||||||
import com.boydti.fawe.beta.implementation.queue.QueueHandler;
|
import com.boydti.fawe.beta.implementation.queue.QueueHandler;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.brush.visualization.VisualQueue;
|
import com.boydti.fawe.object.brush.visualization.VisualQueue;
|
||||||
import com.boydti.fawe.regions.general.integrations.plotquared.PlotSquaredFeature;
|
import com.boydti.fawe.regions.general.integrations.plotquared.PlotSquaredFeature;
|
||||||
|
@ -2,6 +2,8 @@ package com.boydti.fawe;
|
|||||||
|
|
||||||
import com.boydti.fawe.beta.IQueueExtent;
|
import com.boydti.fawe.beta.IQueueExtent;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.config.Settings;
|
||||||
import com.boydti.fawe.object.RegionWrapper;
|
import com.boydti.fawe.object.RegionWrapper;
|
||||||
import com.boydti.fawe.object.changeset.DiskStorageHistory;
|
import com.boydti.fawe.object.changeset.DiskStorageHistory;
|
||||||
@ -232,7 +234,7 @@ public class FaweAPI {
|
|||||||
* @param reason
|
* @param reason
|
||||||
* @see EditSession#getRegionExtent() To get the FaweExtent for an EditSession
|
* @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 {
|
try {
|
||||||
WEManager.IMP.cancelEdit(extent, new FaweException(reason));
|
WEManager.IMP.cancelEdit(extent, new FaweException(reason));
|
||||||
} catch (WorldEditException ignore) {
|
} catch (WorldEditException ignore) {
|
||||||
|
@ -5,6 +5,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
|||||||
|
|
||||||
import com.boydti.fawe.beta.Trimable;
|
import com.boydti.fawe.beta.Trimable;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.collection.BitArray4096;
|
import com.boydti.fawe.object.collection.BitArray4096;
|
||||||
import com.boydti.fawe.object.collection.CleanableThreadLocal;
|
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 FaweChunkLoadException CHUNK = new FaweChunkLoadException();
|
||||||
public static final FaweBlockBagException BLOCK_BAG = new FaweBlockBagException();
|
public static final FaweBlockBagException BLOCK_BAG = new FaweBlockBagException();
|
||||||
public static final FaweException MANUAL = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_MANUAL);
|
public static final FaweException MANUAL = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.manual"));
|
||||||
public static final FaweException NO_REGION = new FaweException(BBC.WORLDEDIT_CANCEL_REASON_NO_REGION);
|
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(BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_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(BBC.WORLDEDIT_CANCEL_REASON_MAX_CHECKS);
|
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(BBC.WORLDEDIT_CANCEL_REASON_MAX_CHANGES);
|
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(BBC.WORLDEDIT_CANCEL_REASON_LOW_MEMORY);
|
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(BBC.WORLDEDIT_CANCEL_REASON_MAX_ENTITIES);
|
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(BBC.WORLDEDIT_CANCEL_REASON_MAX_TILES);
|
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(BBC.WORLDEDIT_CANCEL_REASON_MAX_ITERATIONS);
|
public static final FaweException MAX_ITERATIONS = new FaweException(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.max.iterations"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
thread cache
|
thread cache
|
||||||
|
@ -52,7 +52,7 @@ public class AnvilCommands {
|
|||||||
// boolean copy = false;
|
// boolean copy = false;
|
||||||
// if (FaweAPI.getWorld(folder) != null) {
|
// if (FaweAPI.getWorld(folder) != null) {
|
||||||
// if (!force) {
|
// if (!force) {
|
||||||
// BBC.WORLD_IS_LOADED.send(player);
|
// player.print(TranslatableComponent.of("fawe.worldedit.anvil.world.is.loaded"))
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
// copy = true;
|
// copy = true;
|
||||||
@ -80,7 +80,7 @@ public class AnvilCommands {
|
|||||||
// @Deprecated
|
// @Deprecated
|
||||||
// public static <G, T extends MCAFilter<G>> T runWithSelection(Player player, EditSession editSession, Region selection, T filter) {
|
// public static <G, T extends MCAFilter<G>> T runWithSelection(Player player, EditSession editSession, Region selection, T filter) {
|
||||||
// if (!(selection instanceof CuboidRegion)) {
|
// if (!(selection instanceof CuboidRegion)) {
|
||||||
// BBC.NO_REGION.send(player);
|
// player.print(TranslatableComponent.of("fawe.error.no.region"))
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
// CuboidRegion cuboid = (CuboidRegion) selection;
|
// CuboidRegion cuboid = (CuboidRegion) selection;
|
||||||
@ -131,7 +131,7 @@ public class AnvilCommands {
|
|||||||
// final FaweBlockMatcher matchTo = FaweBlockMatcher.setBlocks(worldEdit.getBlocks(player, to, true));
|
// final FaweBlockMatcher matchTo = FaweBlockMatcher.setBlocks(worldEdit.getBlocks(player, to, true));
|
||||||
// ReplaceSimpleFilter filter = new ReplaceSimpleFilter(matchFrom, matchTo);
|
// ReplaceSimpleFilter filter = new ReplaceSimpleFilter(matchFrom, matchTo);
|
||||||
// ReplaceSimpleFilter result = runWithWorld(player, folder, filter, true);
|
// 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(
|
@Command(
|
||||||
@ -148,7 +148,7 @@ public class AnvilCommands {
|
|||||||
// RemapFilter filter = new RemapFilter(from, to);
|
// RemapFilter filter = new RemapFilter(from, to);
|
||||||
// RemapFilter result = runWithWorld(player, folder, filter, true);
|
// RemapFilter result = runWithWorld(player, folder, filter, true);
|
||||||
// if (result != null) {
|
// 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 filter = new DeleteUninhabitedFilter(fileDurationMillis, inhabitedTicks, fileDurationMillis); TODO NOT IMPLEMENTED
|
||||||
// DeleteUninhabitedFilter result = runWithWorld(player, folder, filter, true);
|
// DeleteUninhabitedFilter result = runWithWorld(player, folder, filter, true);
|
||||||
// if (result != null) {
|
// 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);
|
// DeleteUnclaimedFilter result = runWithWorld(player, folder, filter, true);
|
||||||
// if (result != null) {
|
// 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);
|
// DeleteUnclaimedFilter result = runWithSelection(player, editSession, selection, filter);
|
||||||
// if (result != null) {
|
// 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 filter = new DeleteOldFilter(duration);
|
||||||
// DeleteOldFilter result = runWithWorld(player, folder, filter, true);
|
// DeleteOldFilter result = runWithWorld(player, folder, filter, true);
|
||||||
// if (result != null) {
|
// 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);
|
// MCAQueue queue = new MCAQueue(defaultQueue);
|
||||||
// PlotTrimFilter result = queue.filterWorld(filter);
|
// PlotTrimFilter result = queue.filterWorld(filter);
|
||||||
// if (result != null) {
|
// 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 filter = new DeleteBiomeFilterSimple(biome); TODO NOT IMPLEMENTED
|
||||||
// DeleteBiomeFilterSimple result = runWithWorld(player, folder, filter, true, unsafe);
|
// DeleteBiomeFilterSimple result = runWithWorld(player, folder, filter, true, unsafe);
|
||||||
// if (result != null) {
|
// 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 filter = new TrimAirFilter(); TODO NOT IMPLEMENTED
|
||||||
// TrimAirFilter result = runWithWorld(player, folder, filter, true, unsafe);
|
// TrimAirFilter result = runWithWorld(player, folder, filter, true, unsafe);
|
||||||
// if (result != null) {
|
// 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 filter = new DebugFixP2Roads(); TODO NOT IMPLEMENTED
|
||||||
// DebugFixP2Roads result = runWithWorld(player, folder, filter, true, true);
|
// DebugFixP2Roads result = runWithWorld(player, folder, filter, true, true);
|
||||||
// if (result != null) {
|
// 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);
|
// filter = new ReplacePatternFilter(matchFrom, to);
|
||||||
// }
|
// }
|
||||||
// MCAFilterCounter result = runWithWorld(player, folder, filter, true);
|
// 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;
|
// filter = counter;
|
||||||
// }
|
// }
|
||||||
// MCAFilterCounter result = runWithWorld(player, folder, filter, true);
|
// 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(
|
@Command(
|
||||||
@ -393,7 +393,7 @@ public class AnvilCommands {
|
|||||||
// };
|
// };
|
||||||
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
||||||
// if (result != null) {
|
// 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;
|
// filter = counter;
|
||||||
// }
|
// }
|
||||||
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
// 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);
|
// ReplaceSimpleFilter filter = new ReplaceSimpleFilter(matchFrom, matchTo);
|
||||||
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
||||||
// if (result != null) {
|
// 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);
|
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
||||||
// if (result != null) {
|
// 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 filter = new SetPatternFilter(to); TODO NOT IMPLEMENTED
|
||||||
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
||||||
// if (result != null) {
|
// 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);
|
// RemoveLayerFilter filter = new RemoveLayerFilter(minY, maxY, id);
|
||||||
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
// MCAFilterCounter result = runWithSelection(player, editSession, selection, filter);
|
||||||
// if (result != null) {
|
// 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")
|
@CommandPermissions("worldedit.anvil.copychunks")
|
||||||
public void copy(Player player, LocalSession session, EditSession editSession, @Selection Region selection) throws WorldEditException {
|
public void copy(Player player, LocalSession session, EditSession editSession, @Selection Region selection) throws WorldEditException {
|
||||||
// if (!(selection instanceof CuboidRegion)) { TODO NOT IMPLEMENTED
|
// if (!(selection instanceof CuboidRegion)) { TODO NOT IMPLEMENTED
|
||||||
// BBC.NO_REGION.send(player);
|
// player.print(TranslatableComponent.of("fawe.error.no.region"))
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// CuboidRegion cuboid = (CuboidRegion) selection;
|
// CuboidRegion cuboid = (CuboidRegion) selection;
|
||||||
@ -601,7 +601,7 @@ public class AnvilCommands {
|
|||||||
// MCAClipboard clipboard = new MCAClipboard(queue, cuboid, origin);
|
// MCAClipboard clipboard = new MCAClipboard(queue, cuboid, origin);
|
||||||
// FawePlayer fp = FawePlayer.wrap(player);
|
// FawePlayer fp = FawePlayer.wrap(player);
|
||||||
// fp.setMeta(FawePlayer.METADATA_KEYS.ANVIL_CLIPBOARD, clipboard);
|
// 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(
|
@Command(
|
||||||
@ -638,6 +638,6 @@ public class AnvilCommands {
|
|||||||
// pasteQueue.pasteRegion(copyQueue, copyRegion, offset, iAnvilHistory);
|
// pasteQueue.pasteRegion(copyQueue, copyRegion, offset, iAnvilHistory);
|
||||||
// } catch (IOException e) { throw new RuntimeException(e); }
|
// } 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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.boydti.fawe.Fawe;
|
|||||||
import com.boydti.fawe.FaweAPI;
|
import com.boydti.fawe.FaweAPI;
|
||||||
import com.boydti.fawe.beta.implementation.filter.block.SingleFilterBlock;
|
import com.boydti.fawe.beta.implementation.filter.block.SingleFilterBlock;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.RunnableVal;
|
||||||
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
|
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
|
||||||
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
||||||
@ -949,7 +950,7 @@ public class CFICommands {
|
|||||||
JsonObject data1 = obj.get("data").getAsJsonObject();
|
JsonObject data1 = obj.get("data").getAsJsonObject();
|
||||||
String link = data1.get("link").getAsString();
|
String link = data1.get("link").getAsString();
|
||||||
URL url = new URL(link);
|
URL url = new URL(link);
|
||||||
BBC.DOWNLOAD_LINK.send(player, url);
|
player.print(TranslatableComponent.of("fawe.web.download.link" , url));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
|
@ -3,6 +3,7 @@ package com.boydti.fawe.command;
|
|||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.FaweAPI;
|
import com.boydti.fawe.FaweAPI;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.FaweCommand;
|
import com.boydti.fawe.object.FaweCommand;
|
||||||
import com.boydti.fawe.object.RegionWrapper;
|
import com.boydti.fawe.object.RegionWrapper;
|
||||||
@ -34,11 +35,11 @@ public class Rollback extends FaweCommand {
|
|||||||
}
|
}
|
||||||
Player player = (Player) actor;
|
Player player = (Player) actor;
|
||||||
if (!Settings.IMP.HISTORY.USE_DATABASE) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if (args.length != 3) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
@ -46,13 +47,13 @@ public class Rollback extends FaweCommand {
|
|||||||
case "info":
|
case "info":
|
||||||
case "undo":
|
case "undo":
|
||||||
case "revert":
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (args.length < 1) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
@ -60,7 +61,7 @@ public class Rollback extends FaweCommand {
|
|||||||
case "i":
|
case "i":
|
||||||
case "info":
|
case "info":
|
||||||
if (args.length < 2) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
player.deleteMeta(Player.METADATA_KEYS.ROLLBACK);
|
player.deleteMeta(Player.METADATA_KEYS.ROLLBACK);
|
||||||
@ -101,13 +102,13 @@ public class Rollback extends FaweCommand {
|
|||||||
case "undo":
|
case "undo":
|
||||||
case "revert":
|
case "revert":
|
||||||
if (!player.hasPermission("fawe.rollback.perform")) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
final List<DiskStorageHistory> edits = player.getMeta(Player.METADATA_KEYS.ROLLBACK);
|
final List<DiskStorageHistory> edits = player.getMeta(Player.METADATA_KEYS.ROLLBACK);
|
||||||
player.deleteMeta(Player.METADATA_KEYS.ROLLBACK);
|
player.deleteMeta(Player.METADATA_KEYS.ROLLBACK);
|
||||||
if (edits == null) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
for (DiskStorageHistory edit : edits) {
|
for (DiskStorageHistory edit : edits) {
|
||||||
@ -119,7 +120,7 @@ public class Rollback extends FaweCommand {
|
|||||||
}
|
}
|
||||||
player.print("Rollback complete!");
|
player.print("Rollback complete!");
|
||||||
default:
|
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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -132,7 +133,7 @@ public class Rollback extends FaweCommand {
|
|||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
String[] split = arg.split(":");
|
String[] split = arg.split(":");
|
||||||
if (split.length != 2) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
switch (split[0].toLowerCase()) {
|
switch (split[0].toLowerCase()) {
|
||||||
@ -165,7 +166,7 @@ public class Rollback extends FaweCommand {
|
|||||||
time = MainUtil.timeToSec(split[1]) * 1000;
|
time = MainUtil.timeToSec(split[1]) * 1000;
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,21 @@ import static org.slf4j.LoggerFactory.getLogger;
|
|||||||
|
|
||||||
import com.boydti.fawe.configuration.MemorySection;
|
import com.boydti.fawe.configuration.MemorySection;
|
||||||
import com.boydti.fawe.configuration.file.YamlConfiguration;
|
import com.boydti.fawe.configuration.file.YamlConfiguration;
|
||||||
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
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.io.File;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
@ -20,6 +29,7 @@ public enum BBC {
|
|||||||
* Things to note about this class:
|
* Things to note about this class:
|
||||||
* Can use multiple arguments %s, %s1, %s2, %s3 etc
|
* Can use multiple arguments %s, %s1, %s2, %s3 etc
|
||||||
*/
|
*/
|
||||||
|
PREFIX("&4&lFAWE&7: ", "Info"),
|
||||||
FILE_DELETED("%s0 has been deleted.", "Info"),
|
FILE_DELETED("%s0 has been deleted.", "Info"),
|
||||||
SCHEMATIC_PASTING("&7The schematic is pasting. This cannot be undone.", "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"),
|
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_TRANSFORM("Brush transform set", "WorldEdit.Brush"),
|
||||||
BRUSH_MATERIAL("Brush material set", "WorldEdit.Brush"),
|
BRUSH_MATERIAL("Brush material set", "WorldEdit.Brush"),
|
||||||
|
|
||||||
|
|
||||||
ROLLBACK_ELEMENT("Undoing %s0", "WorldEdit.Rollback"),
|
ROLLBACK_ELEMENT("Undoing %s0", "WorldEdit.Rollback"),
|
||||||
|
|
||||||
TOOL_INSPECT("Inspect tool bound to %s0.", "WorldEdit.Tool"),
|
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_CS("Use /cs with a script name first.", "WorldEdit.Scripting"),
|
||||||
SCRIPTING_ERROR("An error occured while executing a craft script", "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_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_SELECT_CONNECTED("Tip: Select all connected blocks with //sel fuzzy", "Tips"),
|
||||||
TIP_SET_POS1("Tip: Use pos1 as a pattern with //set pos1", "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) {
|
BBC(String defaultMessage, String category) {
|
||||||
this.defaultMessage = defaultMessage;
|
this.defaultMessage = defaultMessage;
|
||||||
this.translatedMessage = defaultMessage;
|
setTranslated(defaultMessage);
|
||||||
this.category = category.toLowerCase(Locale.ROOT);
|
this.category = category.toLowerCase(Locale.ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,7 +439,7 @@ public enum BBC {
|
|||||||
yml.set(caption.category + "." + caption.name().toLowerCase(Locale.ROOT), value);
|
yml.set(caption.category + "." + caption.name().toLowerCase(Locale.ROOT), value);
|
||||||
}
|
}
|
||||||
captions.add(caption);
|
captions.add(caption);
|
||||||
caption.translatedMessage = (String) value;
|
caption.setTranslated((String) value);
|
||||||
} else {
|
} else {
|
||||||
toRemove.add(key);
|
toRemove.add(key);
|
||||||
}
|
}
|
||||||
@ -451,6 +462,10 @@ public enum BBC {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setTranslated(String msg) {
|
||||||
|
this.translatedMessage = msg;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return s();
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object;
|
package com.boydti.fawe.object;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.util.TaskManager;
|
import com.boydti.fawe.util.TaskManager;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ public abstract class FaweCommand<T> {
|
|||||||
TaskManager.IMP.async(() -> execute(player, args));
|
TaskManager.IMP.async(() -> execute(player, args));
|
||||||
} else {
|
} else {
|
||||||
if (!player.runAction(() -> execute(player, args), true, true)) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush;
|
package com.boydti.fawe.object.brush;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.brush.visualization.VisualExtent;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||||
@ -35,14 +36,14 @@ public class CatenaryBrush implements Brush, ResettableTool {
|
|||||||
if (pos1 == null || pos2.equals(pos1)) {
|
if (pos1 == null || pos2.equals(pos1)) {
|
||||||
if (!visual) {
|
if (!visual) {
|
||||||
pos1 = pos2;
|
pos1 = pos2;
|
||||||
BBC.BRUSH_LINE_PRIMARY.send(editSession.getPlayer(), pos2);
|
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.primary", pos2));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.vertex == null) {
|
if (this.vertex == null) {
|
||||||
vertex = getVertex(pos1.toVector3(), pos2.toVector3(), slack);
|
vertex = getVertex(pos1.toVector3(), pos2.toVector3(), slack);
|
||||||
if (this.direction) {
|
if (this.direction) {
|
||||||
BBC.BRUSH_CATENARY_DIRECTION.send(editSession.getPlayer(), 2);
|
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.catenary.direction", 2));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (this.direction) {
|
} else if (this.direction) {
|
||||||
@ -60,7 +61,7 @@ public class CatenaryBrush implements Brush, ResettableTool {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (!visual) {
|
if (!visual) {
|
||||||
BBC.BRUSH_LINE_SECONDARY.send(editSession.getPlayer());
|
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.secondary"));
|
||||||
if (!select) {
|
if (!select) {
|
||||||
pos1 = null;
|
pos1 = null;
|
||||||
return;
|
return;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush;
|
package com.boydti.fawe.object.brush;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.brush.visualization.VisualExtent;
|
||||||
import com.boydti.fawe.object.clipboard.ResizableClipboardBuilder;
|
import com.boydti.fawe.object.clipboard.ResizableClipboardBuilder;
|
||||||
import com.boydti.fawe.object.function.NullRegionFunction;
|
import com.boydti.fawe.object.function.NullRegionFunction;
|
||||||
@ -42,7 +43,7 @@ public class CopyPastaBrush implements Brush, ResettableTool {
|
|||||||
@Override
|
@Override
|
||||||
public boolean reset() {
|
public boolean reset() {
|
||||||
session.setClipboard(null);
|
session.setClipboard(null);
|
||||||
player.print(BBC.BRUSH_RESET.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.reset"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ public class CopyPastaBrush implements Brush, ResettableTool {
|
|||||||
ClipboardHolder holder = new ClipboardHolder(newClipboard);
|
ClipboardHolder holder = new ClipboardHolder(newClipboard);
|
||||||
session.setClipboard(holder);
|
session.setClipboard(holder);
|
||||||
int blocks = builder.size();
|
int blocks = builder.size();
|
||||||
BBC.COMMAND_COPY.send(player, blocks);
|
player.print(TranslatableComponent.of("fawe.worldedit.copy.command.copy" , blocks));
|
||||||
} else {
|
} else {
|
||||||
AffineTransform transform = null;
|
AffineTransform transform = null;
|
||||||
if (randomRotate) {
|
if (randomRotate) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush;
|
package com.boydti.fawe.object.brush;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.object.brush.visualization.cfi.HeightMapMCAGenerator;
|
||||||
import com.boydti.fawe.beta.IQueueExtent;
|
import com.boydti.fawe.beta.IQueueExtent;
|
||||||
import com.boydti.fawe.object.brush.heightmap.HeightMap;
|
import com.boydti.fawe.object.brush.heightmap.HeightMap;
|
||||||
@ -46,7 +47,7 @@ public class HeightBrush implements Brush {
|
|||||||
try {
|
try {
|
||||||
heightMap = ScalableHeightMap.fromPNG(stream);
|
heightMap = ScalableHeightMap.fromPNG(stream);
|
||||||
} catch (IOException e) {
|
} 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) {
|
} else if (clipboard != null) {
|
||||||
heightMap = ScalableHeightMap.fromClipboard(clipboard);
|
heightMap = ScalableHeightMap.fromClipboard(clipboard);
|
||||||
|
@ -2,6 +2,7 @@ package com.boydti.fawe.object.brush;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.database.DBHandler;
|
import com.boydti.fawe.database.DBHandler;
|
||||||
import com.boydti.fawe.database.RollbackDatabase;
|
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.BlockVector3;
|
||||||
import com.sk89q.worldedit.math.Vector3;
|
import com.sk89q.worldedit.math.Vector3;
|
||||||
import com.sk89q.worldedit.util.Location;
|
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.World;
|
||||||
import com.sk89q.worldedit.world.block.BlockState;
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
import java.io.IOException;
|
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) {
|
public boolean perform(final Player player, LocalSession session, boolean rightClick) {
|
||||||
if (!session.isToolControlEnabled() || !player.hasPermission("worldedit.tool.inspect")) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Settings.IMP.HISTORY.USE_DATABASE) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
BlockVector3 target = getTarget(player, rightClick).toBlockPoint();
|
BlockVector3 target = getTarget(player, rightClick).toBlockPoint();
|
||||||
@ -89,7 +91,7 @@ public class InspectBrush extends BrushTool implements DoubleActionTraceTool {
|
|||||||
int index = value.getIndex();
|
int index = value.getIndex();
|
||||||
long age = System.currentTimeMillis() - value.getBDFile().lastModified();
|
long age = System.currentTimeMillis() - value.getBDFile().lastModified();
|
||||||
String ageFormatted = MainUtil.secToTime(age / 1000);
|
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();
|
count.incrementAndGet();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -100,7 +102,7 @@ public class InspectBrush extends BrushTool implements DoubleActionTraceTool {
|
|||||||
}, new Runnable() {
|
}, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
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);
|
}, false, false);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush;
|
package com.boydti.fawe.object.brush;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.brush.visualization.VisualExtent;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||||
@ -25,13 +26,13 @@ public class LineBrush implements Brush, ResettableTool {
|
|||||||
if (pos1 == null) {
|
if (pos1 == null) {
|
||||||
if (!visual) {
|
if (!visual) {
|
||||||
pos1 = position;
|
pos1 = position;
|
||||||
BBC.BRUSH_LINE_PRIMARY.send(editSession.getPlayer(), position);
|
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.primary", position));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
editSession.drawLine(pattern, pos1, position, size, !shell, flat);
|
editSession.drawLine(pattern, pos1, position, size, !shell, flat);
|
||||||
if (!visual) {
|
if (!visual) {
|
||||||
BBC.BRUSH_LINE_SECONDARY.send(editSession.getPlayer());
|
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.line.secondary"));
|
||||||
if (!select) {
|
if (!select) {
|
||||||
pos1 = null;
|
pos1 = null;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,6 +2,7 @@ package com.boydti.fawe.object.brush;
|
|||||||
|
|
||||||
import com.boydti.fawe.FaweCache;
|
import com.boydti.fawe.FaweCache;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.brush.visualization.VisualExtent;
|
||||||
import com.boydti.fawe.object.exception.FaweException;
|
import com.boydti.fawe.object.exception.FaweException;
|
||||||
import com.boydti.fawe.object.mask.IdMask;
|
import com.boydti.fawe.object.mask.IdMask;
|
||||||
@ -94,13 +95,13 @@ public class SplineBrush implements Brush, ResettableTool {
|
|||||||
points.add(position);
|
points.add(position);
|
||||||
}
|
}
|
||||||
this.positionSets.add(points);
|
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) {
|
if (!visualization) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (positionSets.size() < 2) {
|
if (positionSets.size() < 2) {
|
||||||
player.print(BBC.BRUSH_SPLINE_SECONDARY_ERROR.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary.error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<Vector3> centroids = new ArrayList<>();
|
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);
|
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) {
|
if (visualization) {
|
||||||
numSplines = originalSize;
|
numSplines = originalSize;
|
||||||
positionSets.remove(positionSets.size() - 1);
|
positionSets.remove(positionSets.size() - 1);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush;
|
package com.boydti.fawe.object.brush;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.brush.visualization.VisualExtent;
|
||||||
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
|
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
|
||||||
import com.boydti.fawe.util.MathMan;
|
import com.boydti.fawe.util.MathMan;
|
||||||
@ -39,7 +40,7 @@ public class SurfaceSpline implements Brush {
|
|||||||
if (max == -1) return;
|
if (max == -1) return;
|
||||||
// pos.mutY(max);
|
// pos.mutY(max);
|
||||||
path.add(BlockVector3.at(pos.getBlockX(), max, pos.getBlockZ()));
|
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;
|
if (!vis) return;
|
||||||
}
|
}
|
||||||
LocalBlockVectorSet vset = new LocalBlockVectorSet();
|
LocalBlockVectorSet vset = new LocalBlockVectorSet();
|
||||||
@ -93,6 +94,6 @@ public class SurfaceSpline implements Brush {
|
|||||||
editSession.setBlocks(newSet, pattern);
|
editSession.setBlocks(newSet, pattern);
|
||||||
if (!vis) path.clear();
|
if (!vis) path.clear();
|
||||||
}
|
}
|
||||||
editSession.getPlayer().print(BBC.BRUSH_SPLINE_SECONDARY.s());
|
editSession.getPlayer().print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush.scroll;
|
package com.boydti.fawe.object.brush.scroll;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
@ -46,7 +47,7 @@ public abstract class Scroll implements ScrollTool {
|
|||||||
return null;
|
return null;
|
||||||
case CLIPBOARD:
|
case CLIPBOARD:
|
||||||
if (arguments.size() != 2) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
String filename = arguments.get(1);
|
String filename = arguments.get(1);
|
||||||
@ -61,7 +62,7 @@ public abstract class Scroll implements ScrollTool {
|
|||||||
}
|
}
|
||||||
case MASK:
|
case MASK:
|
||||||
if (arguments.size() < 2) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
Mask[] masks = new Mask[arguments.size() - 1];
|
Mask[] masks = new Mask[arguments.size() - 1];
|
||||||
@ -72,7 +73,7 @@ public abstract class Scroll implements ScrollTool {
|
|||||||
return (new ScrollMask(tool, masks));
|
return (new ScrollMask(tool, masks));
|
||||||
case PATTERN:
|
case PATTERN:
|
||||||
if (arguments.size() < 2) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
Pattern[] patterns = new Pattern[arguments.size() - 1];
|
Pattern[] patterns = new Pattern[arguments.size() - 1];
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.brush.sweep;
|
package com.boydti.fawe.object.brush.sweep;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.ResettableTool;
|
||||||
import com.boydti.fawe.object.brush.visualization.VisualExtent;
|
import com.boydti.fawe.object.brush.visualization.VisualExtent;
|
||||||
import com.boydti.fawe.util.MathMan;
|
import com.boydti.fawe.util.MathMan;
|
||||||
@ -53,13 +54,13 @@ public class SweepBrush implements Brush, ResettableTool {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newPos) {
|
if (newPos) {
|
||||||
player.print(BBC.BRUSH_SPLINE_PRIMARY_2.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.primary.2"));
|
||||||
positions.add(position);
|
positions.add(position);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (positions.size() < 2) {
|
if (positions.size() < 2) {
|
||||||
player.printError(BBC.BRUSH_SPLINE_SECONDARY_ERROR.s());
|
player.printError(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary.error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +123,7 @@ public class SweepBrush implements Brush, ResettableTool {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.print(BBC.BRUSH_SPLINE_SECONDARY.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline.secondary"));
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package com.boydti.fawe.object.exception;
|
package com.boydti.fawe.object.exception;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
public class FaweBlockBagException extends FaweException {
|
public class FaweBlockBagException extends FaweException {
|
||||||
public FaweBlockBagException() {
|
public FaweBlockBagException() {
|
||||||
super(BBC.WORLDEDIT_SOME_FAILS_BLOCKBAG);
|
super(TranslatableComponent.of("fawe.error.worldedit.some.fails.blockbag"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,10 @@
|
|||||||
package com.boydti.fawe.object.exception;
|
package com.boydti.fawe.object.exception;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
public class FaweChunkLoadException extends FaweException {
|
public class FaweChunkLoadException extends FaweException {
|
||||||
public FaweChunkLoadException() {
|
public FaweChunkLoadException() {
|
||||||
super(BBC.WORLDEDIT_FAILED_LOAD_CHUNK);
|
super(TranslatableComponent.of("fawe.cancel.worldedit.failed.load.chunk"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,15 @@
|
|||||||
package com.boydti.fawe.object.exception;
|
package com.boydti.fawe.object.exception;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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 com.sk89q.worldedit.extent.Extent;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class FaweException extends RuntimeException {
|
public class FaweException extends RuntimeException {
|
||||||
// DEBUG
|
// DEBUG
|
||||||
public static final FaweException _enableQueue;
|
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) {
|
public FaweException(String reason) {
|
||||||
this.message = reason;
|
this(TextComponent.of(reason));
|
||||||
}
|
}
|
||||||
|
|
||||||
public FaweException(BBC reason) {
|
public FaweException(Component reason) {
|
||||||
this(reason.format());
|
this.message = reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
|
return WorldEditText.reduceToText(message, Locale.ROOT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Component getComponent() {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import com.boydti.fawe.util.WEManager;
|
|||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
import com.sk89q.worldedit.extent.PassthroughExtent;
|
import com.sk89q.worldedit.extent.PassthroughExtent;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
public class MemoryCheckingExtent extends PassthroughExtent {
|
public class MemoryCheckingExtent extends PassthroughExtent {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
@ -22,9 +23,9 @@ public class MemoryCheckingExtent extends PassthroughExtent {
|
|||||||
public Extent getExtent() {
|
public Extent getExtent() {
|
||||||
if (MemUtil.isMemoryLimited()) {
|
if (MemUtil.isMemoryLimited()) {
|
||||||
if (this.player != null) {
|
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")) {
|
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);
|
WEManager.IMP.cancelEdit(this, FaweCache.LOW_MEMORY);
|
||||||
|
@ -6,6 +6,8 @@ import com.boydti.fawe.beta.IChunk;
|
|||||||
import com.boydti.fawe.beta.IChunkGet;
|
import com.boydti.fawe.beta.IChunkGet;
|
||||||
import com.boydti.fawe.beta.IChunkSet;
|
import com.boydti.fawe.beta.IChunkSet;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.FaweLimit;
|
||||||
import com.boydti.fawe.object.exception.FaweException;
|
import com.boydti.fawe.object.exception.FaweException;
|
||||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||||
@ -44,7 +46,7 @@ public class NullExtent extends FaweRegionExtent implements IBatchProcessor {
|
|||||||
*
|
*
|
||||||
* @param extent the extent
|
* @param extent the extent
|
||||||
*/
|
*/
|
||||||
public NullExtent(Extent extent, BBC failReason) {
|
public NullExtent(Extent extent, Component failReason) {
|
||||||
this(extent, new FaweException(failReason));
|
this(extent, new FaweException(failReason));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.boydti.fawe.object.progress;
|
package com.boydti.fawe.object.progress;
|
||||||
|
|
||||||
import com.sk89q.worldedit.entity.Player;
|
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 class ChatProgressTracker extends DefaultProgressTracker {
|
||||||
public ChatProgressTracker(Player player) {
|
public ChatProgressTracker(Player player) {
|
||||||
@ -9,7 +11,7 @@ public class ChatProgressTracker extends DefaultProgressTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendTile(String title, String sub) {
|
public void sendTile(Component title, Component sub) {
|
||||||
getPlayer().print(title + sub);
|
getPlayer().print(TextComponent.builder().append(title).append("\n").append(sub).build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.boydti.fawe.object.progress;
|
package com.boydti.fawe.object.progress;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.config.Settings;
|
||||||
import com.boydti.fawe.util.StringMan;
|
import com.boydti.fawe.util.StringMan;
|
||||||
import com.boydti.fawe.util.TaskManager;
|
import com.boydti.fawe.util.TaskManager;
|
||||||
@ -101,7 +104,7 @@ public class DefaultProgressTracker implements BiConsumer<DefaultProgressTracker
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void doneTask() {
|
public void doneTask() {
|
||||||
sendTile("", BBC.PROGRESS_FINISHED.s());
|
sendTile(TextComponent.empty(), TranslatableComponent.of("fawe.progress.progress.finished"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendTask() {
|
public void sendTask() {
|
||||||
@ -112,10 +115,10 @@ public class DefaultProgressTracker implements BiConsumer<DefaultProgressTracker
|
|||||||
String speedStr = StringMan.padRight("" + speed, 3);
|
String speedStr = StringMan.padRight("" + speed, 3);
|
||||||
String percent = StringMan.padRight("" + (amountDispatch != 0 ? (amountDispatch * 100) / totalQueue : 0), 3);
|
String percent = StringMan.padRight("" + (amountDispatch != 0 ? (amountDispatch * 100) / totalQueue : 0), 3);
|
||||||
int remaining = speed != 0 ? amountQueue / speed : -1;
|
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);
|
player.sendTitle(title, sub);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.boydti.fawe.object.regions.selector;
|
package com.boydti.fawe.object.regions.selector;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.object.regions.FuzzyRegion;
|
||||||
import com.boydti.fawe.util.EditSessionBuilder;
|
import com.boydti.fawe.util.EditSessionBuilder;
|
||||||
import com.boydti.fawe.util.ExtentTraverser;
|
import com.boydti.fawe.util.ExtentTraverser;
|
||||||
@ -88,13 +89,13 @@ public class FuzzyRegionSelector extends PassthroughExtent implements RegionSele
|
|||||||
@Override
|
@Override
|
||||||
public void explainPrimarySelection(Actor actor, LocalSession session, BlockVector3 position) {
|
public void explainPrimarySelection(Actor actor, LocalSession session, BlockVector3 position) {
|
||||||
int size = this.region.getArea();
|
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
|
@Override
|
||||||
public void explainSecondarySelection(Actor actor, LocalSession session, BlockVector3 position) {
|
public void explainSecondarySelection(Actor actor, LocalSession session, BlockVector3 position) {
|
||||||
int size = this.region.getArea();
|
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
|
@Override
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
//import com.boydti.fawe.beta.IChunk;
|
//import com.boydti.fawe.beta.IChunk;
|
||||||
//import com.boydti.fawe.beta.IQueueExtent;
|
//import com.boydti.fawe.beta.IQueueExtent;
|
||||||
//import com.boydti.fawe.config.BBC;
|
//import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
//import com.boydti.fawe.object.*;
|
//import com.boydti.fawe.object.*;
|
||||||
//import com.boydti.fawe.object.brush.visualization.ImmutableVirtualWorld;
|
//import com.boydti.fawe.object.brush.visualization.ImmutableVirtualWorld;
|
||||||
//import com.boydti.fawe.object.clipboard.LazyClipboardHolder;
|
//import com.boydti.fawe.object.clipboard.LazyClipboardHolder;
|
||||||
@ -129,7 +130,7 @@
|
|||||||
// URI uri = file.toURI();
|
// URI uri = file.toURI();
|
||||||
// ClipboardFormat format = ClipboardFormats.findByFile(file);
|
// ClipboardFormat format = ClipboardFormats.findByFile(file);
|
||||||
// format.hold(player, uri, new FileInputStream(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);
|
// session.setVirtualWorld(null);
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
@ -157,7 +158,7 @@
|
|||||||
// session.setClipboard(null);
|
// session.setClipboard(null);
|
||||||
// }
|
// }
|
||||||
// select.put(clicked, false);
|
// select.put(clicked, false);
|
||||||
// BBC.CLIPBOARD_CLEARED.send(player);
|
// player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.cleared"))
|
||||||
// }
|
// }
|
||||||
// } else {
|
// } else {
|
||||||
// // Add it
|
// // Add it
|
||||||
@ -165,7 +166,7 @@
|
|||||||
// MultiClipboardHolder multi = new MultiClipboardHolder(URI.create(""), new LazyClipboardHolder(uri, source, format, null));
|
// MultiClipboardHolder multi = new MultiClipboardHolder(URI.create(""), new LazyClipboardHolder(uri, source, format, null));
|
||||||
// session.addClipboard(multi);
|
// session.addClipboard(multi);
|
||||||
// select.put(clicked, true);
|
// 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
|
// // Resend relevant chunks
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
package com.boydti.fawe.object.visitor;
|
package com.boydti.fawe.object.visitor;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.boydti.fawe.object.IntegerTrio;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.function.RegionFunction;
|
import com.sk89q.worldedit.function.RegionFunction;
|
||||||
import com.sk89q.worldedit.function.operation.Operation;
|
import com.sk89q.worldedit.function.operation.Operation;
|
||||||
import com.sk89q.worldedit.function.operation.RunContext;
|
import com.sk89q.worldedit.function.operation.RunContext;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
|
||||||
|
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -139,9 +145,11 @@ public abstract class DFSVisitor implements Operation {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public Iterable<Component> getStatusMessages() {
|
||||||
public void addStatusMessages(List<String> messages) {
|
return Lists.newArrayList(TranslatableComponent.of(
|
||||||
messages.add(BBC.VISITOR_BLOCK.format(getAffected()));
|
"fawe.worldedit.visitor.visitor.block",
|
||||||
|
TextComponent.of(getAffected())
|
||||||
|
).color(TextColor.GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAffected() {
|
public int getAffected() {
|
||||||
|
@ -10,6 +10,7 @@ import com.boydti.fawe.beta.IQueueExtent;
|
|||||||
import com.boydti.fawe.beta.implementation.processors.LimitProcessor;
|
import com.boydti.fawe.beta.implementation.processors.LimitProcessor;
|
||||||
import com.boydti.fawe.beta.implementation.queue.ParallelQueueExtent;
|
import com.boydti.fawe.beta.implementation.queue.ParallelQueueExtent;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.logging.LoggingChangeSet;
|
import com.boydti.fawe.logging.LoggingChangeSet;
|
||||||
import com.boydti.fawe.logging.rollback.RollbackOptimizedHistory;
|
import com.boydti.fawe.logging.rollback.RollbackOptimizedHistory;
|
||||||
@ -306,7 +307,7 @@ public class EditSessionBuilder {
|
|||||||
if (checkMemory) {
|
if (checkMemory) {
|
||||||
if (MemUtil.isMemoryLimitedSlow()) {
|
if (MemUtil.isMemoryLimitedSlow()) {
|
||||||
if (Permission.hasPermission(player, "worldedit.fast")) {
|
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;
|
throw FaweCache.LOW_MEMORY;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,10 @@ import static org.slf4j.LoggerFactory.getLogger;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.config.Settings;
|
||||||
import com.boydti.fawe.object.FaweInputStream;
|
import com.boydti.fawe.object.FaweInputStream;
|
||||||
import com.boydti.fawe.object.FaweOutputStream;
|
import com.boydti.fawe.object.FaweOutputStream;
|
||||||
@ -61,6 +65,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -831,7 +836,8 @@ public class MainUtil {
|
|||||||
long age = now - file.lastModified();
|
long age = now - file.lastModified();
|
||||||
if (age > timeDiff) {
|
if (age > timeDiff) {
|
||||||
pool.submit(file::delete);
|
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();
|
pool.shutdown();
|
||||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit;
|
|||||||
|
|
||||||
import com.boydti.fawe.FaweCache;
|
import com.boydti.fawe.FaweCache;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.FaweLimit;
|
import com.boydti.fawe.object.FaweLimit;
|
||||||
import com.boydti.fawe.object.RegionWrapper;
|
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();
|
return Collections.emptyMap();
|
||||||
@ -1020,11 +1021,11 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
|||||||
FaweLimit used = getLimitUsed();
|
FaweLimit used = getLimitUsed();
|
||||||
if (used.MAX_FAILS > 0) {
|
if (used.MAX_FAILS > 0) {
|
||||||
if (used.MAX_CHANGES > 0 || used.MAX_ENTITIES > 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){
|
} 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 {
|
} else {
|
||||||
player.printError(BBC.WORLDEDIT_CANCEL_REASON_OUTSIDE_LEVEL.s());
|
player.printError(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.outside.level"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Reset limit
|
// Reset limit
|
||||||
|
@ -61,12 +61,12 @@ import org.enginehub.piston.part.SubCommandPart;
|
|||||||
@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class)
|
@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class)
|
||||||
public class ApplyBrushCommands {
|
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())
|
.defaultsTo(ImmutableList.of())
|
||||||
.ofTypes(ImmutableList.of(Key.of(RegionFactory.class)))
|
.ofTypes(ImmutableList.of(Key.of(RegionFactory.class)))
|
||||||
.build();
|
.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"))
|
.defaultsTo(ImmutableList.of("5"))
|
||||||
.ofTypes(ImmutableList.of(Key.of(double.class)))
|
.ofTypes(ImmutableList.of(Key.of(double.class)))
|
||||||
.build();
|
.build();
|
||||||
@ -85,7 +85,7 @@ public class ApplyBrushCommands {
|
|||||||
|
|
||||||
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.apply")));
|
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.apply")));
|
||||||
builder.addParts(REGION_FACTORY, RADIUS);
|
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()))
|
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
|
||||||
.required()
|
.required()
|
||||||
.build());
|
.build());
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
|
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
@ -205,7 +206,8 @@ public class BiomeCommands {
|
|||||||
TextComponent.of(visitor.getAffected())
|
TextComponent.of(visitor.getAffected())
|
||||||
));
|
));
|
||||||
if (!player.hasPermission("fawe.tips")) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.FaweLimit;
|
import com.boydti.fawe.object.FaweLimit;
|
||||||
import com.boydti.fawe.object.brush.BlendBall;
|
import com.boydti.fawe.object.brush.BlendBall;
|
||||||
@ -272,7 +273,7 @@ public class BrushCommands {
|
|||||||
@Arg(desc = "The radius to sample for blending", def = "25")
|
@Arg(desc = "The radius to sample for blending", def = "25")
|
||||||
Expression radius) throws WorldEditException {
|
Expression radius) throws WorldEditException {
|
||||||
worldEdit.checkMaxBrushRadius(radius);
|
worldEdit.checkMaxBrushRadius(radius);
|
||||||
player.print(BBC.BRUSH_SPLINE.format(radius));
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.spline", (radius)));
|
||||||
set(context,
|
set(context,
|
||||||
new SplineBrush(player))
|
new SplineBrush(player))
|
||||||
.setSize(radius)
|
.setSize(radius)
|
||||||
@ -290,7 +291,7 @@ public class BrushCommands {
|
|||||||
@CommandPermissions("worldedit.brush.sweep")
|
@CommandPermissions("worldedit.brush.sweep")
|
||||||
public void sweepBrush(Player player, InjectedValueAccess context,
|
public void sweepBrush(Player player, InjectedValueAccess context,
|
||||||
@Arg(desc = "int", def = "-1") int copies) throws WorldEditException {
|
@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));
|
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 bias,
|
||||||
@Arg(desc = "double", def = "0") double continuity,
|
@Arg(desc = "double", def = "0") double continuity,
|
||||||
@Arg(desc = "double", def = "10") double quality) throws WorldEditException {
|
@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);
|
worldEdit.checkMaxBrushRadius(radius);
|
||||||
set(context,
|
set(context,
|
||||||
new SurfaceSpline(tension, bias, continuity, quality))
|
new SurfaceSpline(tension, bias, continuity, quality))
|
||||||
@ -388,7 +389,7 @@ public class BrushCommands {
|
|||||||
switch (type.getInternalId()) {
|
switch (type.getInternalId()) {
|
||||||
case BlockID.SAND:
|
case BlockID.SAND:
|
||||||
case BlockID.GRAVEL:
|
case BlockID.GRAVEL:
|
||||||
player.print(BBC.BRUSH_TRY_OTHER.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.try.other"));
|
||||||
falling = true;
|
falling = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -539,12 +540,12 @@ public class BrushCommands {
|
|||||||
try {
|
try {
|
||||||
MultiClipboardHolder clipboards = ClipboardFormats.loadAllFromInput(player, clipboardStr, null, true);
|
MultiClipboardHolder clipboards = ClipboardFormats.loadAllFromInput(player, clipboardStr, null, true);
|
||||||
if (clipboards == null) {
|
if (clipboards == null) {
|
||||||
BBC.SCHEMATIC_NOT_FOUND.send(player, clipboardStr);
|
player.print(TranslatableComponent.of("fawe.error.schematic.not.found" , clipboardStr));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<ClipboardHolder> holders = clipboards.getHolders();
|
List<ClipboardHolder> holders = clipboards.getHolders();
|
||||||
if (holders == null) {
|
if (holders == null) {
|
||||||
BBC.SCHEMATIC_NOT_FOUND.send(player, clipboardStr);
|
player.print(TranslatableComponent.of("fawe.error.schematic.not.found" , clipboardStr));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,7 +846,7 @@ public class BrushCommands {
|
|||||||
@Switch(name = 'r', desc = "Apply random rotation on paste") boolean randomRotate,
|
@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 {
|
@Switch(name = 'a', desc = "Apply auto view based rotation on paste") boolean autoRotate) throws WorldEditException {
|
||||||
worldEdit.checkMaxBrushRadius(radius);
|
worldEdit.checkMaxBrushRadius(radius);
|
||||||
player.print(BBC.BRUSH_COPY.format(radius));
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.copy", (radius)));
|
||||||
|
|
||||||
set(context,
|
set(context,
|
||||||
new CopyPastaBrush(player, session, randomRotate, autoRotate))
|
new CopyPastaBrush(player, session, randomRotate, autoRotate))
|
||||||
@ -920,7 +921,7 @@ public class BrushCommands {
|
|||||||
tool.setPrimary(settings);
|
tool.setPrimary(settings);
|
||||||
tool.setSecondary(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;
|
return settings;
|
||||||
}
|
}
|
||||||
@ -983,9 +984,9 @@ public class BrushCommands {
|
|||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
BBC.SCHEMATIC_SAVED.send(player, name);
|
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.saved" , name));
|
||||||
} else {
|
} 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()) {
|
if (!file.exists()) {
|
||||||
File[] files = folder.listFiles(pathname -> false);
|
File[] files = folder.listFiles(pathname -> false);
|
||||||
BBC.BRUSH_NOT_FOUND.send(player, name);
|
player.print(TranslatableComponent.of("fawe.error.brush.not.found" , name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try (DataInputStream in = new DataInputStream(
|
try (DataInputStream in = new DataInputStream(
|
||||||
@ -1015,10 +1016,10 @@ public class BrushCommands {
|
|||||||
BrushTool tool = BrushTool.fromString(player, session, json);
|
BrushTool tool = BrushTool.fromString(player, session, json);
|
||||||
BaseItem item = player.getItemInHand(HandSide.MAIN_HAND);
|
BaseItem item = player.getItemInHand(HandSide.MAIN_HAND);
|
||||||
session.setTool(item, tool, player);
|
session.setTool(item, tool, player);
|
||||||
BBC.BRUSH_EQUIPPED.send(player, name);
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.equipped" , name));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
player.printError(BBC.BRUSH_INCOMPATIBLE.s());
|
player.printError(TranslatableComponent.of("fawe.error.brush.incompatible"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ public class ChunkCommands {
|
|||||||
actor.printDebug(String.format("%d chunks total marked for deletion. (May have overlaps).",
|
actor.printDebug(String.format("%d chunks total marked for deletion. (May have overlaps).",
|
||||||
currentInfo.batches.stream().mapToInt(ChunkDeletionInfo.ChunkBatch::getChunkCount).sum()));
|
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)
|
.append(TextComponent.of("/stop", TextColor.AQUA)
|
||||||
.clickEvent(ClickEvent.of(ClickEvent.Action.SUGGEST_COMMAND, "/stop"))));
|
.clickEvent(ClickEvent.of(ClickEvent.Action.SUGGEST_COMMAND, "/stop"))));
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.boydti.fawe.FaweAPI;
|
import com.boydti.fawe.FaweAPI;
|
||||||
import com.boydti.fawe.FaweCache;
|
import com.boydti.fawe.FaweCache;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.FaweLimit;
|
import com.boydti.fawe.object.FaweLimit;
|
||||||
import com.boydti.fawe.object.RunnableVal;
|
import com.boydti.fawe.object.RunnableVal;
|
||||||
@ -153,7 +154,8 @@ public class ClipboardCommands {
|
|||||||
}
|
}
|
||||||
Operations.completeLegacy(copy);
|
Operations.completeLegacy(copy);
|
||||||
if (!actor.hasPermission("fawe.tips")) {
|
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);
|
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));
|
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();
|
FaweLimit limit = actor.getLimit();
|
||||||
if (volume >= limit.MAX_CHECKS) {
|
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);
|
session.setClipboard(null);
|
||||||
ReadOnlyClipboard lazyClipboard = ReadOnlyClipboard.of(region, !skipEntities, copyBiomes);
|
ReadOnlyClipboard lazyClipboard = ReadOnlyClipboard.of(region, !skipEntities, copyBiomes);
|
||||||
|
|
||||||
lazyClipboard.setOrigin(session.getPlacementPosition(actor));
|
lazyClipboard.setOrigin(session.getPlacementPosition(actor));
|
||||||
session.setClipboard(new ClipboardHolder(lazyClipboard));
|
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")) {
|
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);
|
// ReadOnlyClipboard lazyClipboard = new WorldCutClipboard(editSession, region, !skipEntities, copyBiomes);
|
||||||
// clipboard.setOrigin(session.getPlacementPosition(actor));
|
// clipboard.setOrigin(session.getPlacementPosition(actor));
|
||||||
// session.setClipboard(new ClipboardHolder(lazyClipboard));
|
// 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(
|
@Command(
|
||||||
@ -273,7 +276,7 @@ public class ClipboardCommands {
|
|||||||
session.setClipboard(new ClipboardHolder(clipboard));
|
session.setClipboard(new ClipboardHolder(clipboard));
|
||||||
|
|
||||||
if (!actor.hasPermission("fawe.tips")) {
|
if (!actor.hasPermission("fawe.tips")) {
|
||||||
BBC.TIP_LAZYCUT.send(actor);
|
actor.print(TranslatableComponent.of("fawe.tips.tip.lazycut"));
|
||||||
}
|
}
|
||||||
copy.getStatusMessages().forEach(actor::print);
|
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 {
|
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);
|
final ClipboardFormat format = ClipboardFormats.findByAlias(formatName);
|
||||||
if (format == null) {
|
if (format == null) {
|
||||||
BBC.CLIPBOARD_INVALID_FORMAT.send(player, formatName);
|
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.invalid.format" , formatName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BBC.GENERATING_LINK.send(player, formatName);
|
player.print(TranslatableComponent.of("fawe.web.generating.link" , formatName));
|
||||||
ClipboardHolder holder = session.getClipboard();
|
ClipboardHolder holder = session.getClipboard();
|
||||||
|
|
||||||
URL url;
|
URL url;
|
||||||
@ -360,14 +363,14 @@ public class ClipboardCommands {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Settings.IMP.WEB.URL.isEmpty()) {
|
if (Settings.IMP.WEB.URL.isEmpty()) {
|
||||||
BBC.SETTING_DISABLE.send(player, "web.url");
|
player.print(TranslatableComponent.of("fawe.error.setting.disable", "web.url"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
url = FaweAPI.upload(target, format);
|
url = FaweAPI.upload(target, format);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
player.printError(BBC.GENERATING_LINK_FAILED.s());
|
player.printError(TranslatableComponent.of("fawe.web.generating.link.failed"));
|
||||||
} else {
|
} else {
|
||||||
String urlText = url.toString();
|
String urlText = url.toString();
|
||||||
if (Settings.IMP.WEB.SHORTEN_URLS) {
|
if (Settings.IMP.WEB.SHORTEN_URLS) {
|
||||||
@ -377,7 +380,7 @@ public class ClipboardCommands {
|
|||||||
e.printStackTrace();
|
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 {
|
} else {
|
||||||
target = clipboard;
|
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()) {
|
if (Settings.IMP.WEB.ASSETS.isEmpty()) {
|
||||||
BBC.SETTING_DISABLE.send(player, "web.assets");
|
player.print(TranslatableComponent.of("fawe.error.setting.disable", "web.assets"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
URL url = format.uploadPublic(target, category.replaceAll("[/|\\\\]", "."), player.getName());
|
URL url = format.uploadPublic(target, category.replaceAll("[/|\\\\]", "."), player.getName());
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
player.printError(BBC.GENERATING_LINK_FAILED.s());
|
player.printError(TranslatableComponent.of("fawe.web.generating.link.failed"));
|
||||||
} else {
|
} 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);
|
selector.explainRegionAdjust(actor, session);
|
||||||
}
|
}
|
||||||
if (!actor.hasPermission("fawe.tips")) {
|
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) {
|
if (onlySelect) {
|
||||||
actor.printInfo(TranslatableComponent.of("worldedit.paste.selected"));
|
actor.printInfo(TranslatableComponent.of("worldedit.paste.selected"));
|
||||||
@ -491,7 +495,7 @@ public class ClipboardCommands {
|
|||||||
PasteEvent event = new PasteEvent(player, clipboard, uri, editSession, to);
|
PasteEvent event = new PasteEvent(player, clipboard, uri, editSession, to);
|
||||||
WorldEdit.getInstance().getEventBus().post(event);
|
WorldEdit.getInstance().getEventBus().post(event);
|
||||||
if (event.isCancelled()) {
|
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.learnChanges();
|
||||||
selector.explainRegionAdjust(actor, session);
|
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")) {
|
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));
|
holder.setTransform(holder.getTransform().combine(transform));
|
||||||
actor.printInfo(TranslatableComponent.of("worldedit.rotate.rotated"));
|
actor.printInfo(TranslatableComponent.of("worldedit.rotate.rotated"));
|
||||||
if (!actor.hasPermission("fawe.tips")) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.object.extent.ResettableExtent;
|
||||||
import com.boydti.fawe.util.CachedTextureUtil;
|
import com.boydti.fawe.util.CachedTextureUtil;
|
||||||
import com.boydti.fawe.util.CleanTextureUtil;
|
import com.boydti.fawe.util.CleanTextureUtil;
|
||||||
@ -357,7 +358,7 @@ public class GeneralCommands {
|
|||||||
// TODO NOT IMPLEMENTED convert this to an ArgumentConverter
|
// TODO NOT IMPLEMENTED convert this to an ArgumentConverter
|
||||||
if (arguments.isEmpty()) {
|
if (arguments.isEmpty()) {
|
||||||
session.setTextureUtil(null);
|
session.setTextureUtil(null);
|
||||||
player.print(BBC.TEXTURE_DISABLED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.general.texture.disabled"));
|
||||||
} else {
|
} else {
|
||||||
String arg = arguments.get(0);
|
String arg = arguments.get(0);
|
||||||
String argLower = arg.toLowerCase(Locale.ROOT);
|
String argLower = arg.toLowerCase(Locale.ROOT);
|
||||||
@ -400,7 +401,7 @@ public class GeneralCommands {
|
|||||||
}
|
}
|
||||||
if (!(util instanceof CachedTextureUtil)) util = new CachedTextureUtil(util);
|
if (!(util instanceof CachedTextureUtil)) util = new CachedTextureUtil(util);
|
||||||
session.setTextureUtil(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 {
|
public void gsmask(Player player, LocalSession session, EditSession editSession, @Arg(desc = "The mask to set", def = "") Mask maskOpt) throws WorldEditException {
|
||||||
session.setSourceMask(maskOpt);
|
session.setSourceMask(maskOpt);
|
||||||
if (maskOpt == null) {
|
if (maskOpt == null) {
|
||||||
player.print(BBC.SOURCE_MASK_DISABLED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.general.source.mask.disabled"));
|
||||||
} else {
|
} 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 {
|
public void gtransform(Player player, EditSession editSession, LocalSession session, ResettableExtent transform) throws WorldEditException {
|
||||||
session.setTransform(transform);
|
session.setTransform(transform);
|
||||||
if (transform == null) {
|
if (transform == null) {
|
||||||
player.print(BBC.TRANSFORM_DISABLED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.general.transform.disabled"));
|
||||||
} else {
|
} else {
|
||||||
player.print(BBC.TRANSFORM.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.general.transform"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,9 +445,9 @@ public class GeneralCommands {
|
|||||||
@CommandPermissions("fawe.tips")
|
@CommandPermissions("fawe.tips")
|
||||||
public void tips(Player player, LocalSession session) throws WorldEditException {
|
public void tips(Player player, LocalSession session) throws WorldEditException {
|
||||||
if (player.togglePermission("fawe.tips")) {
|
if (player.togglePermission("fawe.tips")) {
|
||||||
player.print(BBC.WORLDEDIT_TOGGLE_TIPS_ON.s());
|
player.print(TranslatableComponent.of("fawe.info.worldedit.toggle.tips.on"));
|
||||||
} else {
|
} else {
|
||||||
player.print(BBC.WORLDEDIT_TOGGLE_TIPS_OFF.s());
|
player.print(TranslatableComponent.of("fawe.info.worldedit.toggle.tips.off"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ import static com.sk89q.worldedit.internal.command.CommandUtil.checkCommandArgum
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.MainUtil;
|
||||||
import com.boydti.fawe.util.MathMan;
|
import com.boydti.fawe.util.MathMan;
|
||||||
import com.boydti.fawe.util.TextureUtil;
|
import com.boydti.fawe.util.TextureUtil;
|
||||||
@ -110,7 +111,7 @@ public class GenerationCommands {
|
|||||||
@Arg(name = "pocketMax", desc = "TODO", def = "3") int pocketMaxOpt) throws WorldEditException {
|
@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);
|
CavesGen gen = new CavesGen(sizeOpt, frequencyOpt, rarityOpt, minYOpt, maxYOpt, systemFrequencyOpt, individualRarityOpt, pocketChanceOpt, pocketMinOpt, pocketMaxOpt);
|
||||||
editSession.generate(region, gen);
|
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)
|
@Confirm(Confirm.Processor.REGION)
|
||||||
public void ores(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, @Arg(desc = "Mask") Mask mask) throws WorldEditException {
|
public void ores(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, @Arg(desc = "Mask") Mask mask) throws WorldEditException {
|
||||||
editSession.addOres(region, mask);
|
editSession.addOres(region, mask);
|
||||||
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
|
actor.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , editSession.getBlockChangeCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -164,7 +165,7 @@ public class GenerationCommands {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
Operations.completeBlindly(visitor);
|
Operations.completeBlindly(visitor);
|
||||||
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
|
actor.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , editSession.getBlockChangeCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -176,7 +177,7 @@ public class GenerationCommands {
|
|||||||
@Confirm(Confirm.Processor.REGION)
|
@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 {
|
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);
|
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(
|
@Command(
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.FaweAPI;
|
import com.boydti.fawe.FaweAPI;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.database.DBHandler;
|
import com.boydti.fawe.database.DBHandler;
|
||||||
import com.boydti.fawe.database.RollbackDatabase;
|
import com.boydti.fawe.database.RollbackDatabase;
|
||||||
@ -88,13 +89,13 @@ public class HistoryCommands {
|
|||||||
@CommandPermissions("worldedit.history.rollback")
|
@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 {
|
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) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (user.charAt(0) == '#') {
|
if (user.charAt(0) == '#') {
|
||||||
if (user.equals("#import")) {
|
if (user.equals("#import")) {
|
||||||
if (!player.hasPermission("fawe.rollback.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;
|
return;
|
||||||
}
|
}
|
||||||
File folder = MainUtil.getFile(Fawe.imp().getDirectory(), Settings.IMP.PATHS.HISTORY);
|
File folder = MainUtil.getFile(Fawe.imp().getDirectory(), Settings.IMP.PATHS.HISTORY);
|
||||||
@ -147,7 +148,7 @@ public class HistoryCommands {
|
|||||||
}
|
}
|
||||||
String toParse = user.substring(1);
|
String toParse = user.substring(1);
|
||||||
if (!MathMan.isInteger(toParse)) {
|
if (!MathMan.isInteger(toParse)) {
|
||||||
BBC.COMMAND_SYNTAX.send(player, "/frb #<index>");
|
player.print(TranslatableComponent.of("fawe.error.command.syntax" , "/frb #<index>"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int index = Integer.parseInt(toParse);
|
int index = Integer.parseInt(toParse);
|
||||||
@ -157,24 +158,24 @@ public class HistoryCommands {
|
|||||||
if (file.getBDFile().exists()) {
|
if (file.getBDFile().exists()) {
|
||||||
if (restore) file.redo(player);
|
if (restore) file.redo(player);
|
||||||
else file.undo(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 {
|
} else {
|
||||||
BBC.TOOL_INSPECT_INFO_FOOTER.send(player, 0);
|
player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.inspect.info.footer" , 0));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UUID other = Fawe.imp().getUUID(user);
|
UUID other = Fawe.imp().getUUID(user);
|
||||||
if (other == null) {
|
if (other == null) {
|
||||||
BBC.PLAYER_NOT_FOUND.send(player, user);
|
player.print(TranslatableComponent.of("fawe.error.player.not.found" , user));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (radius == 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
long timeDiff = MainUtil.timeToSec(time) * 1000;
|
long timeDiff = MainUtil.timeToSec(time) * 1000;
|
||||||
if (timeDiff == 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
radius = Math.max(Math.min(500, radius), 0);
|
radius = Math.max(Math.min(500, radius), 0);
|
||||||
@ -189,7 +190,7 @@ public class HistoryCommands {
|
|||||||
|
|
||||||
Region[] allowedRegions = player.getCurrentRegions(FaweMaskManager.MaskType.OWNER);
|
Region[] allowedRegions = player.getCurrentRegions(FaweMaskManager.MaskType.OWNER);
|
||||||
if (allowedRegions == null) {
|
if (allowedRegions == null) {
|
||||||
player.printError(BBC.NO_REGION.s());
|
player.printError(TranslatableComponent.of("fawe.error.no.region"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO mask the regions bot / top to the bottom and top coord in the allowedRegions
|
// TODO mask the regions bot / top to the bottom and top coord in the allowedRegions
|
||||||
@ -203,10 +204,10 @@ public class HistoryCommands {
|
|||||||
@Override
|
@Override
|
||||||
public void run(DiskStorageHistory edit) {
|
public void run(DiskStorageHistory edit) {
|
||||||
edit.undo(player, allowedRegions);
|
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();
|
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(
|
@Command(
|
||||||
@ -235,7 +236,7 @@ public class HistoryCommands {
|
|||||||
times = Math.max(1, times);
|
times = Math.max(1, times);
|
||||||
LocalSession undoSession = session;
|
LocalSession undoSession = session;
|
||||||
if (session.hasFastMode()) {
|
if (session.hasFastMode()) {
|
||||||
player.print(BBC.COMMAND_UNDO_DISABLED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.history.command.undo.disabled"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (playerName != null) {
|
if (playerName != null) {
|
||||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import static com.sk89q.worldedit.command.util.Logging.LogMode.POSITION;
|
import static com.sk89q.worldedit.command.util.Logging.LogMode.POSITION;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
|
@ -62,17 +62,17 @@ import static org.enginehub.piston.part.CommandParts.arg;
|
|||||||
@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class)
|
@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class)
|
||||||
public class PaintBrushCommands {
|
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())
|
.defaultsTo(ImmutableList.of())
|
||||||
.ofTypes(ImmutableList.of(Key.of(RegionFactory.class)))
|
.ofTypes(ImmutableList.of(Key.of(RegionFactory.class)))
|
||||||
.build();
|
.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"))
|
.defaultsTo(ImmutableList.of("5"))
|
||||||
.ofTypes(ImmutableList.of(Key.of(double.class)))
|
.ofTypes(ImmutableList.of(Key.of(double.class)))
|
||||||
.build();
|
.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"))
|
.defaultsTo(ImmutableList.of("20"))
|
||||||
.ofTypes(ImmutableList.of(Key.of(double.class)))
|
.ofTypes(ImmutableList.of(Key.of(double.class)))
|
||||||
.build();
|
.build();
|
||||||
@ -92,7 +92,7 @@ public class PaintBrushCommands {
|
|||||||
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.paint")));
|
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.paint")));
|
||||||
|
|
||||||
builder.addParts(REGION_FACTORY, RADIUS, DENSITY);
|
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()))
|
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
|
||||||
.required()
|
.required()
|
||||||
.build());
|
.build());
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import com.boydti.fawe.FaweAPI;
|
import com.boydti.fawe.FaweAPI;
|
||||||
import com.boydti.fawe.FaweCache;
|
import com.boydti.fawe.FaweCache;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.object.FaweLimit;
|
import com.boydti.fawe.object.FaweLimit;
|
||||||
import com.sk89q.jnbt.CompoundTag;
|
import com.sk89q.jnbt.CompoundTag;
|
||||||
import com.sk89q.worldedit.EditSession;
|
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 static com.sk89q.worldedit.command.util.Logging.LogMode.ALL;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import com.sk89q.worldedit.util.TreeGenerator.TreeType;
|
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.World;
|
||||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
@ -119,7 +121,8 @@ public class RegionCommands {
|
|||||||
if (affected != 0) {
|
if (affected != 0) {
|
||||||
actor.printInfo(TranslatableComponent.of("worldedit.set.done"));
|
actor.printInfo(TranslatableComponent.of("worldedit.set.done"));
|
||||||
if (!actor.hasPermission("fawe.tips"))
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -142,7 +145,6 @@ public class RegionCommands {
|
|||||||
@CommandPermissions("worldedit.region.test")
|
@CommandPermissions("worldedit.region.test")
|
||||||
@Logging(REGION)
|
@Logging(REGION)
|
||||||
public void test(Player player, EditSession editSession, @Arg(desc = "test") @Confirm(RADIUS) BlockVector3 radius) throws WorldEditException {
|
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(new ChunkSendProcessor(editSession.getWorld(), () -> Collections.singleton(player)));
|
||||||
// editSession.addProcessor(NullProcessor.INSTANCE);
|
// editSession.addProcessor(NullProcessor.INSTANCE);
|
||||||
// FlatRegionFunction replace = new BiomeReplace(editSession, biome);
|
// 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));
|
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);
|
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(
|
@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));
|
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);
|
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(
|
@Command(
|
||||||
@ -204,14 +206,14 @@ public class RegionCommands {
|
|||||||
public void nbtinfo(Player player, EditSession editSession) {
|
public void nbtinfo(Player player, EditSession editSession) {
|
||||||
Location pos = player.getBlockTrace(128);
|
Location pos = player.getBlockTrace(128);
|
||||||
if (pos == null) {
|
if (pos == null) {
|
||||||
player.printError(BBC.NO_BLOCK.s());
|
player.printError(TranslatableComponent.of("fawe.navigation.no.block"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CompoundTag nbt = editSession.getFullBlock(pos.toBlockPoint()).getNbtData();
|
CompoundTag nbt = editSession.getFullBlock(pos.toBlockPoint()).getNbtData();
|
||||||
if (nbt != null) {
|
if (nbt != null) {
|
||||||
player.print(nbt.getValue().toString());
|
player.print(nbt.getValue().toString());
|
||||||
} else {
|
} 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);
|
editSession.setBlock(x, y, z, patternArg);
|
||||||
affected++;
|
affected++;
|
||||||
}
|
}
|
||||||
BBC.VISITOR_BLOCK.send(player, affected);
|
player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , affected));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -448,9 +450,9 @@ public class RegionCommands {
|
|||||||
@CommandPermissions("fawe.admin")
|
@CommandPermissions("fawe.admin")
|
||||||
public void wea(Actor actor) throws WorldEditException {
|
public void wea(Actor actor) throws WorldEditException {
|
||||||
if (actor.togglePermission("fawe.bypass")) {
|
if (actor.togglePermission("fawe.bypass")) {
|
||||||
actor.print(BBC.WORLDEDIT_BYPASSED.s());
|
actor.print(TranslatableComponent.of("fawe.info.worldedit.bypassed"));
|
||||||
} else {
|
} 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 {
|
public void wer(Player player) throws WorldEditException {
|
||||||
final Region region = player.getLargestRegion();
|
final Region region = player.getLargestRegion();
|
||||||
if (region == null) {
|
if (region == null) {
|
||||||
player.print(BBC.NO_REGION.s());
|
player.print(TranslatableComponent.of("fawe.error.no.region"));
|
||||||
} else {
|
} else {
|
||||||
player.setSelection(region);
|
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")
|
@CommandPermissions("worldedit.region.move")
|
||||||
@Logging(ORIENTATION_REGION)
|
@Logging(ORIENTATION_REGION)
|
||||||
@Confirm(Confirm.Processor.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,
|
@Selection Region region,
|
||||||
@Arg(desc = "# of blocks to move", def = "1")
|
@Arg(desc = "# of blocks to move", def = "1")
|
||||||
int count,
|
int count,
|
||||||
@ -543,7 +545,7 @@ public class RegionCommands {
|
|||||||
@Arg(desc = "BlockStateHolder", def = "air") BlockStateHolder replace,
|
@Arg(desc = "BlockStateHolder", def = "air") BlockStateHolder replace,
|
||||||
@Switch(name = 'm', desc = "TODO") boolean notFullHeight) throws WorldEditException {
|
@Switch(name = 'm', desc = "TODO") boolean notFullHeight) throws WorldEditException {
|
||||||
int affected = editSession.fall(region, !notFullHeight, replace);
|
int affected = editSession.fall(region, !notFullHeight, replace);
|
||||||
BBC.VISITOR_BLOCK.send(player, affected);
|
player.print(TranslatableComponent.of("fawe.worldedit.visitor.visitor.block" , affected));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -552,7 +554,7 @@ public class RegionCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.region.stack")
|
@CommandPermissions("worldedit.region.stack")
|
||||||
@Logging(ORIENTATION_REGION)
|
@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,
|
@Selection Region region,
|
||||||
@Arg(desc = "# of copies to stack", def = "1")
|
@Arg(desc = "# of copies to stack", def = "1")
|
||||||
@Confirm(Confirm.Processor.REGION) int count,
|
@Confirm(Confirm.Processor.REGION) int count,
|
||||||
@ -663,7 +665,7 @@ public class RegionCommands {
|
|||||||
@CommandPermissions("worldedit.regen")
|
@CommandPermissions("worldedit.regen")
|
||||||
@Logging(REGION)
|
@Logging(REGION)
|
||||||
@Confirm(Confirm.Processor.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 biome") BiomeType biome,
|
||||||
@Arg(def = "", desc = "Regenerate with seed") Long seed) throws WorldEditException {
|
@Arg(def = "", desc = "Regenerate with seed") Long seed) throws WorldEditException {
|
||||||
Mask mask = session.getMask();
|
Mask mask = session.getMask();
|
||||||
|
@ -23,6 +23,7 @@ import static com.boydti.fawe.util.ReflectionUtils.as;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
||||||
import com.boydti.fawe.object.clipboard.URIClipboardHolder;
|
import com.boydti.fawe.object.clipboard.URIClipboardHolder;
|
||||||
@ -134,14 +135,14 @@ public class SchematicCommands {
|
|||||||
boolean randomRotate) throws FilenameException {
|
boolean randomRotate) throws FilenameException {
|
||||||
final ClipboardFormat format = ClipboardFormats.findByAlias(formatName);
|
final ClipboardFormat format = ClipboardFormats.findByAlias(formatName);
|
||||||
if (format == null) {
|
if (format == null) {
|
||||||
BBC.CLIPBOARD_INVALID_FORMAT.send(player, formatName);
|
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.invalid.format" , formatName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
MultiClipboardHolder all = ClipboardFormats.loadAllFromInput(player, filename, null, true);
|
MultiClipboardHolder all = ClipboardFormats.loadAllFromInput(player, filename, null, true);
|
||||||
if (all != null) {
|
if (all != null) {
|
||||||
session.addClipboard(all);
|
session.addClipboard(all);
|
||||||
BBC.SCHEMATIC_LOADED.send(player, filename);
|
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.loaded" , filename));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
@ -155,7 +156,7 @@ public class SchematicCommands {
|
|||||||
@CommandPermissions({"worldedit.clipboard.clear", "worldedit.schematic.clear"})
|
@CommandPermissions({"worldedit.clipboard.clear", "worldedit.schematic.clear"})
|
||||||
public void clear(Player player, LocalSession session) throws WorldEditException {
|
public void clear(Player player, LocalSession session) throws WorldEditException {
|
||||||
session.setClipboard(null);
|
session.setClipboard(null);
|
||||||
player.print(BBC.CLIPBOARD_CLEARED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.cleared"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -185,11 +186,11 @@ public class SchematicCommands {
|
|||||||
} else {
|
} else {
|
||||||
session.setClipboard(null);
|
session.setClipboard(null);
|
||||||
}
|
}
|
||||||
player.print(BBC.CLIPBOARD_CLEARED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.cleared"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BBC.CLIPBOARD_URI_NOT_FOUND.send(player, fileName);
|
player.print(TranslatableComponent.of("fawe.worldedit.clipboard.clipboard.uri.not.found" , fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -225,7 +226,7 @@ public class SchematicCommands {
|
|||||||
URI uri;
|
URI uri;
|
||||||
if (filename.startsWith("url:")) {
|
if (filename.startsWith("url:")) {
|
||||||
if (!actor.hasPermission("worldedit.schematic.load.web")) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
UUID uuid = UUID.fromString(filename.substring(4));
|
UUID uuid = UUID.fromString(filename.substring(4));
|
||||||
@ -252,7 +253,7 @@ public class SchematicCommands {
|
|||||||
}
|
}
|
||||||
} else {
|
} 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()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (format == null && filename.matches(".*\\.[\\w].*")) {
|
if (format == null && filename.matches(".*\\.[\\w].*")) {
|
||||||
@ -282,7 +283,7 @@ public class SchematicCommands {
|
|||||||
uri = file.toURI();
|
uri = file.toURI();
|
||||||
}
|
}
|
||||||
format.hold(actor, uri, in);
|
format.hold(actor, uri, in);
|
||||||
BBC.SCHEMATIC_LOADED.send(actor, filename);
|
actor.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.loaded" , filename));
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
actor.printError("Unknown filename: " + filename);
|
actor.printError("Unknown filename: " + filename);
|
||||||
} catch (URISyntaxException | IOException e) {
|
} catch (URISyntaxException | IOException e) {
|
||||||
@ -331,7 +332,7 @@ public class SchematicCommands {
|
|||||||
if (filename.contains("../")) {
|
if (filename.contains("../")) {
|
||||||
other = true;
|
other = true;
|
||||||
if (!actor.hasPermission("worldedit.schematic.save.other")) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (filename.startsWith("../")) {
|
if (filename.startsWith("../")) {
|
||||||
@ -349,7 +350,7 @@ public class SchematicCommands {
|
|||||||
}
|
}
|
||||||
if (other) {
|
if (other) {
|
||||||
if (!actor.hasPermission("worldedit.schematic.delete.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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -395,13 +396,13 @@ public class SchematicCommands {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && !MainUtil.isInSubDirectory(dir, destDir) && !player.hasPermission("worldedit.schematic.move.other")) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
ClipboardHolder clipboard = session.getClipboard();
|
ClipboardHolder clipboard = session.getClipboard();
|
||||||
List<File> sources = getFiles(clipboard);
|
List<File> sources = getFiles(clipboard);
|
||||||
if (sources.isEmpty()) {
|
if (sources.isEmpty()) {
|
||||||
player.printError(BBC.SCHEMATIC_NONE.s());
|
player.printError(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!destDir.exists() && !destDir.mkdirs()) {
|
if (!destDir.exists() && !destDir.mkdirs()) {
|
||||||
@ -411,19 +412,19 @@ public class SchematicCommands {
|
|||||||
for (File source : sources) {
|
for (File source : sources) {
|
||||||
File destFile = new File(destDir, source.getName());
|
File destFile = new File(destDir, source.getName());
|
||||||
if (destFile.exists()) {
|
if (destFile.exists()) {
|
||||||
BBC.SCHEMATIC_MOVE_EXISTS.send(player, destFile);
|
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.move.exists" , destFile));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && (!MainUtil.isInSubDirectory(dir, destFile) || !MainUtil.isInSubDirectory(dir, source)) && !player.hasPermission("worldedit.schematic.delete.other")) {
|
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,
|
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.move.failed", destFile,
|
||||||
BBC.NO_PERM.format("worldedit.schematic.move.other"));
|
TranslatableComponent.of("fawe.error.no.perm", ("worldedit.schematic.move.other"))));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
File cached = new File(source.getParentFile(), "." + source.getName() + ".cached");
|
File cached = new File(source.getParentFile(), "." + source.getName() + ".cached");
|
||||||
Files.move(source.toPath(), destFile.toPath());
|
Files.move(source.toPath(), destFile.toPath());
|
||||||
if (cached.exists()) Files.move(cached.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) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
@ -482,7 +483,7 @@ public class SchematicCommands {
|
|||||||
if (args.argsLength() == 0) {
|
if (args.argsLength() == 0) {
|
||||||
if (fp.getSession().getVirtualWorld() != null) fp.setVirtualWorld(null);
|
if (fp.getSession().getVirtualWorld() != null) fp.setVirtualWorld(null);
|
||||||
else {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@ -504,11 +505,11 @@ public class SchematicCommands {
|
|||||||
long total = count.longValue();
|
long total = count.longValue();
|
||||||
if (total == 0) {
|
if (total == 0) {
|
||||||
if (args.getJoinedStrings(0).toLowerCase().startsWith("all")) {
|
if (args.getJoinedStrings(0).toLowerCase().startsWith("all")) {
|
||||||
BBC.SCHEMATIC_NONE.send(player);
|
player.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"))
|
||||||
} else {
|
} else {
|
||||||
String joined = args.getJoinedStrings(0);
|
String joined = args.getJoinedStrings(0);
|
||||||
String cmd = "/" + Commands.getAlias(SchematicCommands.class, "schematic") + " " + getCommand().aliases()[0] + " all " + joined;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@ -517,11 +518,11 @@ public class SchematicCommands {
|
|||||||
|
|
||||||
String cmdPrefix = "/" + (config.noDoubleSlash ? "" : "/");
|
String cmdPrefix = "/" + (config.noDoubleSlash ? "" : "/");
|
||||||
String cmdShow = Commands.getAlias(ClipboardCommands.class, "schematic") + " " + Commands.getAlias(ClipboardCommands.class, "show");
|
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) {
|
if (fp.getSession().getExistingClipboard() != null) {
|
||||||
String cmd = cmdPrefix + Commands.getAlias(ClipboardCommands.class, "clearclipboard");
|
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) {
|
} catch (Throwable e) {
|
||||||
@ -720,9 +721,9 @@ public class SchematicCommands {
|
|||||||
writer.write(target);
|
writer.write(target);
|
||||||
}
|
}
|
||||||
log.info(actor.getName() + " saved " + file.getCanonicalPath());
|
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 {
|
} else {
|
||||||
actor.printError(BBC.WORLDEDIT_CANCEL_REASON_MANUAL.s());
|
actor.printError(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason.manual"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -836,14 +837,14 @@ public class SchematicCommands {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Settings.IMP.PATHS.PER_PLAYER_SCHEMATICS && !MainUtil.isInSubDirectory(dir, f) && !actor.hasPermission("worldedit.schematic.delete.other")) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
if (!deleteFile(f)) {
|
if (!deleteFile(f)) {
|
||||||
actor.printError(TranslatableComponent.of("worldedit.schematic.delete.failed", TextComponent.of(filename)));
|
actor.printError(TranslatableComponent.of("worldedit.schematic.delete.failed", TextComponent.of(filename)));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BBC.FILE_DELETED.send(actor, filename);
|
actor.print(TranslatableComponent.of("fawe.info.file.deleted" , filename));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import static com.sk89q.worldedit.command.util.Logging.LogMode.ALL;
|
import static com.sk89q.worldedit.command.util.Logging.LogMode.ALL;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
|
@ -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 static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.clipboard.URIClipboardHolder;
|
||||||
import com.boydti.fawe.object.mask.IdMask;
|
import com.boydti.fawe.object.mask.IdMask;
|
||||||
import com.boydti.fawe.object.regions.selector.FuzzyRegionSelector;
|
import com.boydti.fawe.object.regions.selector.FuzzyRegionSelector;
|
||||||
@ -303,7 +304,8 @@ public class SelectionCommands {
|
|||||||
player.printInfo(TranslatableComponent.of("worldedit.wand.selwand.info"));
|
player.printInfo(TranslatableComponent.of("worldedit.wand.selwand.info"));
|
||||||
}
|
}
|
||||||
if (!player.hasPermission("fawe.tips"))
|
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(
|
@Command(
|
||||||
@ -590,11 +592,11 @@ public class SelectionCommands {
|
|||||||
|
|
||||||
final BlockState state = c.getID();
|
final BlockState state = c.getID();
|
||||||
final BlockType blockType = state.getBlockType();
|
final BlockType blockType = state.getBlockType();
|
||||||
TextComponent blockName = TextComponent.of(blockType.getName(), TextColor.LIGHT_PURPLE);
|
TextComponent blockName = TextComponent.of(blockType.getName(), TextColor.GRAY);
|
||||||
TextComponent toolTip;
|
TextComponent toolTip;
|
||||||
if (separateStates && state != blockType.getDefaultState()) {
|
if (separateStates && state != blockType.getDefaultState()) {
|
||||||
toolTip = TextComponent.of(state.getAsString(), TextColor.GRAY);
|
toolTip = TextComponent.of(state.getAsString(), TextColor.GRAY);
|
||||||
blockName = blockName.append(TextComponent.of("*", TextColor.LIGHT_PURPLE));
|
blockName = blockName.append(TextComponent.of("*", TextColor.GRAY));
|
||||||
} else {
|
} else {
|
||||||
toolTip = TextComponent.of(blockType.getId(), TextColor.GRAY);
|
toolTip = TextComponent.of(blockType.getId(), TextColor.GRAY);
|
||||||
}
|
}
|
||||||
@ -677,10 +679,10 @@ public class SelectionCommands {
|
|||||||
}
|
}
|
||||||
case POLYHEDRAL:
|
case POLYHEDRAL:
|
||||||
newSelector = new PolyhedralRegionSelector(world);
|
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();
|
Optional<Integer> limit = ActorSelectorLimits.forActor(actor).getPolyhedronVertexLimit();
|
||||||
limit.ifPresent(integer -> actor.print(BBC.SEL_MAX.format(integer)));
|
limit.ifPresent(integer -> actor.print(TranslatableComponent.of("fawe.selection.sel.max", (integer))));
|
||||||
actor.print(BBC.SEL_LIST.s());
|
actor.print(TranslatableComponent.of("fawe.selection.sel.list"));
|
||||||
break;
|
break;
|
||||||
case FUZZY:
|
case FUZZY:
|
||||||
case MAGIC:
|
case MAGIC:
|
||||||
@ -689,8 +691,8 @@ public class SelectionCommands {
|
|||||||
}
|
}
|
||||||
//TODO Make FuzzyRegionSelector accept actors
|
//TODO Make FuzzyRegionSelector accept actors
|
||||||
newSelector = new FuzzyRegionSelector((Player) actor, world, maskOpt);
|
newSelector = new FuzzyRegionSelector((Player) actor, world, maskOpt);
|
||||||
actor.print(BBC.SEL_FUZZY.s());
|
actor.print(TranslatableComponent.of("fawe.selection.sel.fuzzy"));
|
||||||
actor.print(BBC.SEL_LIST.s());
|
actor.print(TranslatableComponent.of("fawe.selection.sel.list"));
|
||||||
break;
|
break;
|
||||||
case LIST:
|
case LIST:
|
||||||
default:
|
default:
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
package com.sk89q.worldedit.command;
|
package com.sk89q.worldedit.command;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
@ -260,7 +261,7 @@ public class SnapshotCommands {
|
|||||||
public Component getComponent(int number) {
|
public Component getComponent(int number) {
|
||||||
final Snapshot snapshot = snapshots.get(number);
|
final Snapshot snapshot = snapshots.get(number);
|
||||||
return TextComponent.of(number + 1 + ". ", TextColor.GOLD)
|
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")))
|
.hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TextComponent.of("Click to use")))
|
||||||
.clickEvent(ClickEvent.of(ClickEvent.Action.RUN_COMMAND, "/snap use " + snapshot.getName())));
|
.clickEvent(ClickEvent.of(ClickEvent.Action.RUN_COMMAND, "/snap use " + snapshot.getName())));
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command;
|
package com.sk89q.worldedit.command;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import com.google.common.collect.Collections2;
|
import com.google.common.collect.Collections2;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.object.brush.InspectBrush;
|
import com.boydti.fawe.object.brush.InspectBrush;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command;
|
package com.sk89q.worldedit.command;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.BrushSettings;
|
||||||
import com.boydti.fawe.object.brush.TargetMode;
|
import com.boydti.fawe.object.brush.TargetMode;
|
||||||
import com.boydti.fawe.object.brush.scroll.Scroll;
|
import com.boydti.fawe.object.brush.scroll.Scroll;
|
||||||
@ -79,7 +80,7 @@ public class ToolUtilCommands {
|
|||||||
throws WorldEditException {
|
throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (maskOpt == null) {
|
if (maskOpt == null) {
|
||||||
@ -109,7 +110,7 @@ public class ToolUtilCommands {
|
|||||||
Arguments arguments) throws WorldEditException {
|
Arguments arguments) throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pattern == null) {
|
if (pattern == null) {
|
||||||
@ -158,7 +159,7 @@ public class ToolUtilCommands {
|
|||||||
)
|
)
|
||||||
public void none(Player player, LocalSession session) throws WorldEditException {
|
public void none(Player player, LocalSession session) throws WorldEditException {
|
||||||
session.setTool(player, null);
|
session.setTool(player, null);
|
||||||
player.print(BBC.TOOL_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.tool.tool.none"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -258,13 +259,13 @@ public class ToolUtilCommands {
|
|||||||
throws WorldEditException {
|
throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
VisualMode[] modes = VisualMode.values();
|
VisualMode[] modes = VisualMode.values();
|
||||||
VisualMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
|
VisualMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
|
||||||
tool.setVisualMode(player, newMode);
|
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(
|
@Command(
|
||||||
@ -277,13 +278,13 @@ public class ToolUtilCommands {
|
|||||||
@Arg(name = "mode", desc = "int", def = "0") int mode) throws WorldEditException {
|
@Arg(name = "mode", desc = "int", def = "0") int mode) throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TargetMode[] modes = TargetMode.values();
|
TargetMode[] modes = TargetMode.values();
|
||||||
TargetMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
|
TargetMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
|
||||||
tool.setTargetMode(newMode);
|
tool.setTargetMode(newMode);
|
||||||
BBC.BRUSH_TARGET_MODE_SET.send(player, newMode);
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.target.mode.set" , newMode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -296,11 +297,11 @@ public class ToolUtilCommands {
|
|||||||
int offset) throws WorldEditException {
|
int offset) throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tool.setTargetOffset(offset);
|
tool.setTargetOffset(offset);
|
||||||
BBC.BRUSH_TARGET_OFFSET_SET.send(player, offset);
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.target.offset.set" , offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -317,7 +318,7 @@ public class ToolUtilCommands {
|
|||||||
List<String> commandStr) throws WorldEditException {
|
List<String> commandStr) throws WorldEditException {
|
||||||
BrushTool bt = session.getBrushTool(player, false);
|
BrushTool bt = session.getBrushTool(player, false);
|
||||||
if (bt == null) {
|
if (bt == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,11 +326,11 @@ public class ToolUtilCommands {
|
|||||||
Scroll action = Scroll.fromArguments(bt, player, session, mode, commandStr, true);
|
Scroll action = Scroll.fromArguments(bt, player, session, mode, commandStr, true);
|
||||||
settings.setScrollAction(action);
|
settings.setScrollAction(action);
|
||||||
if (mode == Scroll.Action.NONE) {
|
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) {
|
} else if (action != null) {
|
||||||
String full = (mode.name().toLowerCase() + " " + StringMan.join(commandStr, " ")).trim();
|
String full = (mode.name().toLowerCase() + " " + StringMan.join(commandStr, " ")).trim();
|
||||||
settings.addSetting(BrushSettings.SettingType.SCROLL_ACTION, full);
|
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();
|
bt.update();
|
||||||
}
|
}
|
||||||
@ -351,11 +352,11 @@ public class ToolUtilCommands {
|
|||||||
Arguments arguments) throws WorldEditException {
|
Arguments arguments) throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (maskArg == null) {
|
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);
|
tool.setSourceMask(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -364,7 +365,7 @@ public class ToolUtilCommands {
|
|||||||
settings.addSetting(BrushSettings.SettingType.SOURCE_MASK, lastArg);
|
settings.addSetting(BrushSettings.SettingType.SOURCE_MASK, lastArg);
|
||||||
settings.setSourceMask(maskArg);
|
settings.setSourceMask(maskArg);
|
||||||
tool.update();
|
tool.update();
|
||||||
player.print(BBC.BRUSH_SOURCE_MASK.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.source.mask"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -379,11 +380,11 @@ public class ToolUtilCommands {
|
|||||||
Arguments arguments) throws WorldEditException {
|
Arguments arguments) throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(BBC.BRUSH_NONE.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (transform == null) {
|
if (transform == null) {
|
||||||
player.print(BBC.BRUSH_TRANSFORM_DISABLED.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.transform.disabled"));
|
||||||
tool.setTransform(null);
|
tool.setTransform(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -392,6 +393,6 @@ public class ToolUtilCommands {
|
|||||||
settings.addSetting(BrushSettings.SettingType.TRANSFORM, lastArg);
|
settings.addSetting(BrushSettings.SettingType.TRANSFORM, lastArg);
|
||||||
settings.setTransform(transform);
|
settings.setTransform(transform);
|
||||||
tool.update();
|
tool.update();
|
||||||
player.print(BBC.BRUSH_TRANSFORM.s());
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.transform"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import static com.sk89q.worldedit.command.util.Logging.LogMode.PLACEMENT;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.DelegateConsumer;
|
import com.boydti.fawe.object.DelegateConsumer;
|
||||||
import com.boydti.fawe.object.function.QuadFunction;
|
import com.boydti.fawe.object.function.QuadFunction;
|
||||||
@ -189,7 +190,7 @@ public class UtilityCommands {
|
|||||||
@SkipQueue
|
@SkipQueue
|
||||||
public void cancel(Player player) {
|
public void cancel(Player player) {
|
||||||
int cancelled = player.cancel(false);
|
int cancelled = player.cancel(false);
|
||||||
BBC.WORLDEDIT_CANCEL_COUNT.send(player, cancelled);
|
player.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.count" , cancelled));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
@ -696,7 +697,7 @@ public class UtilityCommands {
|
|||||||
double result = expression.evaluate(
|
double result = expression.evaluate(
|
||||||
new double[]{}, WorldEdit.getInstance().getSessionManager().get(actor).getTimeout());
|
new double[]{}, WorldEdit.getInstance().getSessionManager().get(actor).getTimeout());
|
||||||
String formatted = Double.isNaN(result) ? "NaN" : formatForLocale(actor.getLocale()).format(result);
|
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);
|
}, (Component) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,7 +709,7 @@ public class UtilityCommands {
|
|||||||
@CommandPermissions("fawe.confirm")
|
@CommandPermissions("fawe.confirm")
|
||||||
public void confirm(Player fp) throws WorldEditException {
|
public void confirm(Player fp) throws WorldEditException {
|
||||||
if (!fp.confirm()) {
|
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);
|
getFiles(dir, actor, args, formatName, playerFolder, fileList::add);
|
||||||
|
|
||||||
if (fileList.isEmpty()) {
|
if (fileList.isEmpty()) {
|
||||||
BBC.SCHEMATIC_NONE.send(actor);
|
actor.print(TranslatableComponent.of("fawe.worldedit.schematic.schematic.none"));
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.command;
|
|||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.FaweVersion;
|
import com.boydti.fawe.FaweVersion;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.util.IncendoPaster;
|
import com.boydti.fawe.util.IncendoPaster;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command.tool;
|
package com.sk89q.worldedit.command.tool;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
|
@ -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.NullProcessor;
|
||||||
import com.boydti.fawe.beta.implementation.processors.PersistentChunkSendProcessor;
|
import com.boydti.fawe.beta.implementation.processors.PersistentChunkSendProcessor;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.RunnableVal;
|
||||||
import com.boydti.fawe.object.brush.BrushSettings;
|
import com.boydti.fawe.object.brush.BrushSettings;
|
||||||
import com.boydti.fawe.object.brush.MovableTool;
|
import com.boydti.fawe.object.brush.MovableTool;
|
||||||
@ -500,7 +501,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
|||||||
if (brush == null) return false;
|
if (brush == null) return false;
|
||||||
|
|
||||||
if (current.setWorld(player.getWorld().getName()) && !current.canUse(player)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
try (EditSession editSession = session.createEditSession(player)) {
|
try (EditSession editSession = session.createEditSession(player)) {
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command.tool;
|
package com.sk89q.worldedit.command.tool;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command.tool;
|
package com.sk89q.worldedit.command.tool;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
|
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
|
||||||
|
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command.tool;
|
package com.sk89q.worldedit.command.tool;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.command.tool;
|
package com.sk89q.worldedit.command.tool;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
|
@ -103,7 +103,7 @@ public final class AsyncCommandBuilder<T> {
|
|||||||
|
|
||||||
public AsyncCommandBuilder<T> onSuccess(@Nullable String message, @Nullable Consumer<T> consumer) {
|
public AsyncCommandBuilder<T> onSuccess(@Nullable String message, @Nullable Consumer<T> consumer) {
|
||||||
checkArgument(message != null || consumer != null, "Can't have null message AND 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;
|
this.consumer = consumer;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.sk89q.worldedit.command.util.annotation;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.util.task.InterruptableCondition;
|
import com.boydti.fawe.util.task.InterruptableCondition;
|
||||||
import com.sk89q.worldedit.IncompleteRegionException;
|
import com.sk89q.worldedit.IncompleteRegionException;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
@ -47,7 +48,7 @@ public @interface Confirm {
|
|||||||
BlockVector3 max = region.getMaximumPoint();
|
BlockVector3 max = region.getMaximumPoint();
|
||||||
long area = (max.getX() - min.getX()) * (max.getZ() - min.getZ() + 1) * (int) value;
|
long area = (max.getX() - min.getX()) * (max.getZ() - min.getZ() + 1) * (int) value;
|
||||||
if (area > 2 << 18) {
|
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 confirm(actor, context);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -58,7 +59,7 @@ public @interface Confirm {
|
|||||||
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
|
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
|
||||||
int max = WorldEdit.getInstance().getConfiguration().maxRadius;
|
int max = WorldEdit.getInstance().getConfiguration().maxRadius;
|
||||||
if (value > max) {
|
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 Processor.confirm(actor, context);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -69,7 +70,7 @@ public @interface Confirm {
|
|||||||
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
|
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
|
||||||
int max = 50;// TODO configurable, get Key.of(Method.class) @Limit
|
int max = 50;// TODO configurable, get Key.of(Method.class) @Limit
|
||||||
if (value > max) {
|
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 Processor.confirm(actor, context);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -78,7 +79,7 @@ public @interface Confirm {
|
|||||||
ALWAYS {
|
ALWAYS {
|
||||||
@Override
|
@Override
|
||||||
public boolean passes(Actor actor, InjectedValueAccess context, double value) {
|
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);
|
return confirm(actor, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ import com.sk89q.worldedit.session.request.Request;
|
|||||||
import com.sk89q.worldedit.util.Direction;
|
import com.sk89q.worldedit.util.Direction;
|
||||||
import com.sk89q.worldedit.util.HandSide;
|
import com.sk89q.worldedit.util.HandSide;
|
||||||
import com.sk89q.worldedit.util.Location;
|
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.World;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
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
|
* Loads any history items from disk: - Should already be called if history on disk is enabled
|
||||||
|
@ -23,6 +23,7 @@ import com.google.common.collect.Maps;
|
|||||||
|
|
||||||
import com.boydti.fawe.command.SuggestInputParseException;
|
import com.boydti.fawe.command.SuggestInputParseException;
|
||||||
import com.boydti.fawe.config.BBC;
|
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.JSON2NBT;
|
||||||
import com.boydti.fawe.jnbt.NBTException;
|
import com.boydti.fawe.jnbt.NBTException;
|
||||||
import com.boydti.fawe.util.MathMan;
|
import com.boydti.fawe.util.MathMan;
|
||||||
@ -424,7 +425,7 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
if (context.isRestricted()) {
|
if (context.isRestricted()) {
|
||||||
Actor actor = context.requireActor();
|
Actor actor = context.requireActor();
|
||||||
if (!actor.hasPermission("worldedit.anyblock") && worldEdit.getConfiguration().checkDisallowedBlocks(holder)) {
|
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();
|
CompoundTag nbt = holder.getNbtData();
|
||||||
if (nbt != null) {
|
if (nbt != null) {
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.extension.factory.parser.mask;
|
|||||||
import com.boydti.fawe.command.FaweParser;
|
import com.boydti.fawe.command.FaweParser;
|
||||||
import com.boydti.fawe.command.SuggestInputParseException;
|
import com.boydti.fawe.command.SuggestInputParseException;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.util.StringMan;
|
import com.boydti.fawe.util.StringMan;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.sk89q.minecraft.util.commands.CommandException;
|
import com.sk89q.minecraft.util.commands.CommandException;
|
||||||
@ -149,7 +150,7 @@ public class DefaultMaskParser extends FaweParser<Mask> {
|
|||||||
input = input.substring(input.indexOf(char0) + 1);
|
input = input.substring(input.indexOf(char0) + 1);
|
||||||
mask = parseFromInput(char0 + "[" + input + "]", context);
|
mask = parseFromInput(char0 + "[" + input + "]", context);
|
||||||
if (actor != null) {
|
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;
|
return mask;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public abstract class AbstractNonPlayerActor implements Actor {
|
|||||||
} else {
|
} else {
|
||||||
FaweException fe = FaweException.get(throwable);
|
FaweException fe = FaweException.get(throwable);
|
||||||
if (fe != null) {
|
if (fe != null) {
|
||||||
printError(fe.getMessage());
|
printError(fe.getComponent());
|
||||||
} else {
|
} else {
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.extension.platform;
|
|||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.exception.FaweException;
|
||||||
import com.boydti.fawe.object.task.SimpleAsyncNotifyQueue;
|
import com.boydti.fawe.object.task.SimpleAsyncNotifyQueue;
|
||||||
import com.boydti.fawe.regions.FaweMaskManager;
|
import com.boydti.fawe.regions.FaweMaskManager;
|
||||||
@ -111,7 +112,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
|||||||
} else {
|
} else {
|
||||||
FaweException fe = FaweException.get(throwable);
|
FaweException fe = FaweException.get(throwable);
|
||||||
if (fe != null) {
|
if (fe != null) {
|
||||||
printError(fe.getMessage());
|
printError(fe.getComponent());
|
||||||
} else {
|
} else {
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ package com.sk89q.worldedit.extension.platform;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.FaweLimit;
|
import com.boydti.fawe.object.FaweLimit;
|
||||||
import com.boydti.fawe.object.brush.visualization.VirtualWorld;
|
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
|
* @param component The component to print
|
||||||
*/
|
*/
|
||||||
default void printInfo(Component component) {
|
default void printInfo(Component component) {
|
||||||
print(component.color(TextColor.LIGHT_PURPLE));
|
print(component.color(TextColor.GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,6 +25,7 @@ import com.boydti.fawe.command.AnvilCommandsRegistration;
|
|||||||
import com.boydti.fawe.command.CFICommands;
|
import com.boydti.fawe.command.CFICommands;
|
||||||
import com.boydti.fawe.command.CFICommandsRegistration;
|
import com.boydti.fawe.command.CFICommandsRegistration;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
|
import com.boydti.fawe.object.brush.visualization.cfi.HeightMapMCAGenerator;
|
||||||
import com.boydti.fawe.object.changeset.CFIChangeSet;
|
import com.boydti.fawe.object.changeset.CFIChangeSet;
|
||||||
@ -736,7 +737,7 @@ public final class PlatformCommandManager {
|
|||||||
actor.print(e.getRichMessage());
|
actor.print(e.getRichMessage());
|
||||||
}
|
}
|
||||||
} catch (FaweException e) {
|
} catch (FaweException e) {
|
||||||
actor.printError("Edit cancelled: " + e.getMessage());
|
actor.printError(TextComponent.builder().append("Edit cancelled: ").append(e.getComponent()).build());
|
||||||
} catch (UsageException e) {
|
} catch (UsageException e) {
|
||||||
ImmutableList<Command> cmd = e.getCommands();
|
ImmutableList<Command> cmd = e.getCommands();
|
||||||
if (!cmd.isEmpty()) {
|
if (!cmd.isEmpty()) {
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.extension.platform;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
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.brush.visualization.VirtualWorld;
|
||||||
import com.boydti.fawe.object.exception.FaweException;
|
import com.boydti.fawe.object.exception.FaweException;
|
||||||
import com.boydti.fawe.object.pattern.PatternTraverser;
|
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.PlatformInitializeEvent;
|
||||||
import com.sk89q.worldedit.event.platform.PlatformReadyEvent;
|
import com.sk89q.worldedit.event.platform.PlatformReadyEvent;
|
||||||
import com.sk89q.worldedit.event.platform.PlayerInputEvent;
|
import com.sk89q.worldedit.event.platform.PlayerInputEvent;
|
||||||
|
import com.sk89q.worldedit.math.Vector3;
|
||||||
import com.sk89q.worldedit.session.request.Request;
|
import com.sk89q.worldedit.session.request.Request;
|
||||||
import com.sk89q.worldedit.util.HandSide;
|
import com.sk89q.worldedit.util.HandSide;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
@ -384,7 +386,7 @@ public class PlatformManager {
|
|||||||
public void handleThrowable(Throwable e, Actor actor) {
|
public void handleThrowable(Throwable e, Actor actor) {
|
||||||
FaweException faweException = FaweException.get(e);
|
FaweException faweException = FaweException.get(e);
|
||||||
if (faweException != null) {
|
if (faweException != null) {
|
||||||
BBC.WORLDEDIT_CANCEL_REASON.send(actor, faweException.getMessage());
|
actor.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason" , faweException.getComponent()));
|
||||||
} else {
|
} else {
|
||||||
actor.printError("Please report this error: [See console]");
|
actor.printError("Please report this error: [See console]");
|
||||||
actor.printRaw(e.getClass().getName() + ": " + e.getMessage());
|
actor.printRaw(e.getClass().getName() + ": " + e.getMessage());
|
||||||
@ -436,7 +438,7 @@ public class PlatformManager {
|
|||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
FaweException faweException = FaweException.get(e);
|
FaweException faweException = FaweException.get(e);
|
||||||
if (faweException != null) {
|
if (faweException != null) {
|
||||||
BBC.WORLDEDIT_CANCEL_REASON.send(player, faweException.getMessage());
|
player.print(TranslatableComponent.of("fawe.cancel.worldedit.cancel.reason" , faweException.getComponent()));
|
||||||
} else {
|
} else {
|
||||||
player.printError("Please report this error: [See console]");
|
player.printError("Please report this error: [See console]");
|
||||||
player.printRaw(e.getClass().getName() + ": " + e.getMessage());
|
player.printRaw(e.getClass().getName() + ": " + e.getMessage());
|
||||||
|
@ -217,7 +217,7 @@ public class PlayerProxy extends AbstractPlayerActor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendTitle(String title, String sub) {
|
public void sendTitle(Component title, Component sub) {
|
||||||
basePlayer.sendTitle(title, sub);
|
basePlayer.sendTitle(title, sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.extent.clipboard.io;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.clipboard.LazyClipboardHolder;
|
import com.boydti.fawe.object.clipboard.LazyClipboardHolder;
|
||||||
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
import com.boydti.fawe.object.clipboard.MultiClipboardHolder;
|
||||||
@ -170,7 +171,7 @@ public class ClipboardFormats {
|
|||||||
LocalConfiguration config = worldEdit.getConfiguration();
|
LocalConfiguration config = worldEdit.getConfiguration();
|
||||||
if (input.startsWith("url:")) {
|
if (input.startsWith("url:")) {
|
||||||
if (!player.hasPermission("worldedit.schematic.load.web")) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
URL base = new URL(Settings.IMP.WEB.URL);
|
URL base = new URL(Settings.IMP.WEB.URL);
|
||||||
@ -178,19 +179,19 @@ public class ClipboardFormats {
|
|||||||
}
|
}
|
||||||
if (input.startsWith("http")) {
|
if (input.startsWith("http")) {
|
||||||
if (!player.hasPermission("worldedit.schematic.load.asset")) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
URL url = new URL(input);
|
URL url = new URL(input);
|
||||||
URL webInterface = new URL(Settings.IMP.WEB.ASSETS);
|
URL webInterface = new URL(Settings.IMP.WEB.ASSETS);
|
||||||
if (!url.getHost().equalsIgnoreCase(webInterface.getHost())) {
|
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 null;
|
||||||
}
|
}
|
||||||
return loadAllFromUrl(url);
|
return loadAllFromUrl(url);
|
||||||
} else {
|
} 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 (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;
|
return null;
|
||||||
}
|
}
|
||||||
File working = worldEdit.getWorkingDirectoryFile(config.saveDir);
|
File working = worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||||
@ -210,7 +211,7 @@ public class ClipboardFormats {
|
|||||||
}
|
}
|
||||||
} else {
|
} 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 (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;
|
return null;
|
||||||
}
|
}
|
||||||
if (format == null && input.matches(".*\\.[\\w].*")) {
|
if (format == null && input.matches(".*\\.[\\w].*")) {
|
||||||
@ -232,12 +233,12 @@ public class ClipboardFormats {
|
|||||||
if (format == null && f.isFile()) {
|
if (format == null && f.isFile()) {
|
||||||
format = findByFile(f);
|
format = findByFile(f);
|
||||||
if (format == null) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!f.exists()) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
if (!f.isDirectory()) {
|
if (!f.isDirectory()) {
|
||||||
@ -247,7 +248,7 @@ public class ClipboardFormats {
|
|||||||
}
|
}
|
||||||
URIClipboardHolder[] clipboards = loadAllFromDirectory(f);
|
URIClipboardHolder[] clipboards = loadAllFromDirectory(f);
|
||||||
if (clipboards.length < 1) {
|
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 null;
|
||||||
}
|
}
|
||||||
return new MultiClipboardHolder(f.toURI(), clipboards);
|
return new MultiClipboardHolder(f.toURI(), clipboards);
|
||||||
|
@ -196,7 +196,7 @@ public class Deform implements Contextual<Operation> {
|
|||||||
@Override
|
@Override
|
||||||
public Iterable<Component> getStatusMessages() {
|
public Iterable<Component> getStatusMessages() {
|
||||||
return Lists.newArrayList(TranslatableComponent.of("worldedit.operation.deform.expression",
|
return Lists.newArrayList(TranslatableComponent.of("worldedit.operation.deform.expression",
|
||||||
TextComponent.of(expression).color(TextColor.LIGHT_PURPLE)));
|
TextComponent.of(expression).color(TextColor.GRAY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -430,11 +430,11 @@ public class ForwardExtentCopy implements Operation {
|
|||||||
public Iterable<Component> getStatusMessages() {
|
public Iterable<Component> getStatusMessages() {
|
||||||
List<Component> messages = new ArrayList<>();
|
List<Component> messages = new ArrayList<>();
|
||||||
messages.add(TranslatableComponent.of("worldedit.operation.affected.block",
|
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",
|
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",
|
messages.add(TranslatableComponent.of("worldedit.operation.affected.entity",
|
||||||
TextComponent.of(affectedEntities)).color(TextColor.LIGHT_PURPLE));
|
TextComponent.of(affectedEntities)).color(TextColor.GRAY));
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.object.collection.BlockVectorSet;
|
import com.boydti.fawe.object.collection.BlockVectorSet;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
@ -283,7 +284,7 @@ public abstract class BreadthFirstSearch implements Operation {
|
|||||||
return Lists.newArrayList(TranslatableComponent.of(
|
return Lists.newArrayList(TranslatableComponent.of(
|
||||||
"worldedit.operation.affected.block",
|
"worldedit.operation.affected.block",
|
||||||
TextComponent.of(getAffected())
|
TextComponent.of(getAffected())
|
||||||
).color(TextColor.LIGHT_PURPLE));
|
).color(TextColor.GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.function.visitor;
|
package com.sk89q.worldedit.function.visitor;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ public class EntityVisitor implements Operation {
|
|||||||
return Lists.newArrayList(TranslatableComponent.of(
|
return Lists.newArrayList(TranslatableComponent.of(
|
||||||
"worldedit.operation.affected.entity",
|
"worldedit.operation.affected.entity",
|
||||||
TextComponent.of(getAffected())
|
TextComponent.of(getAffected())
|
||||||
).color(TextColor.LIGHT_PURPLE));
|
).color(TextColor.GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.function.visitor;
|
package com.sk89q.worldedit.function.visitor;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
@ -87,7 +88,7 @@ public class FlatRegionVisitor implements Operation {
|
|||||||
return Lists.newArrayList(TranslatableComponent.of(
|
return Lists.newArrayList(TranslatableComponent.of(
|
||||||
"worldedit.operation.affected.column",
|
"worldedit.operation.affected.column",
|
||||||
TextComponent.of(getAffected())
|
TextComponent.of(getAffected())
|
||||||
).color(TextColor.LIGHT_PURPLE));
|
).color(TextColor.GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.function.visitor;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.function.RegionFunction;
|
import com.sk89q.worldedit.function.RegionFunction;
|
||||||
import com.sk89q.worldedit.function.operation.Operation;
|
import com.sk89q.worldedit.function.operation.Operation;
|
||||||
@ -99,7 +100,7 @@ public class RegionVisitor implements Operation {
|
|||||||
return Lists.newArrayList(TranslatableComponent.of(
|
return Lists.newArrayList(TranslatableComponent.of(
|
||||||
"worldedit.operation.affected.block",
|
"worldedit.operation.affected.block",
|
||||||
TextComponent.of(getAffected())
|
TextComponent.of(getAffected())
|
||||||
).color(TextColor.LIGHT_PURPLE));
|
).color(TextColor.GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.regions.selector;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.IncompleteRegionException;
|
import com.sk89q.worldedit.IncompleteRegionException;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.regions.selector;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.IncompleteRegionException;
|
import com.sk89q.worldedit.IncompleteRegionException;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.regions.selector;
|
package com.sk89q.worldedit.regions.selector;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldedit.regions.selector;
|
package com.sk89q.worldedit.regions.selector;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
|
@ -22,6 +22,7 @@ package com.sk89q.worldedit.regions.selector;
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.sk89q.worldedit.IncompleteRegionException;
|
import com.sk89q.worldedit.IncompleteRegionException;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
import com.sk89q.worldedit.extension.platform.Actor;
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -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.description.vert": "Vertically expand the selection to world limits.",
|
||||||
"worldedit.expand.expanded": "Region expanded {0} blocks",
|
"worldedit.expand.expanded": "Region expanded {0} blocks",
|
||||||
"worldedit.expand.expanded.vert": "Region expanded {0} blocks (top-to-bottom).",
|
"worldedit.expand.expanded.vert": "Region expanded {0} blocks (top-to-bottom).",
|
||||||
|
Loading…
Reference in New Issue
Block a user