mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Minors
- Make disallowed-blocks translatable - Add more trnslatable messages - Update WorldEdit messages missing a prefix
This commit is contained in:
@ -152,7 +152,7 @@ public abstract class HelpBuilder implements Runnable {
|
||||
displayFailure(BBC.HELP_SUGGEST.f(arg, StringMan.join(found, ", ")));
|
||||
return;
|
||||
} else {
|
||||
String msg = String.format("The sub-command '%s' under '%s' could not be found.",
|
||||
String msg = String.format(BBC.getPrefix() + "The sub-command '%s' under '%s' could not be found.",
|
||||
command, Joiner.on(" ").join(visited));
|
||||
displayFailure(msg);
|
||||
return;
|
||||
|
@ -165,8 +165,8 @@ public class NavigationCommands {
|
||||
@Command(
|
||||
aliases = {"jumpto", "j"},
|
||||
usage = "[world,x,y,z]",
|
||||
desc = "Teleport to a location" +
|
||||
"Flags:\n" +
|
||||
desc = "Teleport to a location\n" +
|
||||
"Flags:" +
|
||||
" -f forces the specified position to be used",
|
||||
flags = "f",
|
||||
min = 0,
|
||||
|
@ -267,14 +267,14 @@ public class OptionsCommands {
|
||||
actor.print(BBC.getPrefix() + type.getId() + " (" + type.getName() + ")");
|
||||
} else {
|
||||
if (query.length() <= 2) {
|
||||
actor.printError("Enter a longer search string (len > 2).");
|
||||
actor.printError(BBC.getPrefix() + "Enter a longer search string (len > 2).");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!blocksOnly && !itemsOnly) {
|
||||
actor.print(BBC.getPrefix() + "Searching for: " + query);
|
||||
} else if (blocksOnly && itemsOnly) {
|
||||
actor.printError("You cannot use both the 'b' and 'i' flags simultaneously.");
|
||||
actor.printError(BBC.getPrefix() + "You cannot use both the 'b' and 'i' flags simultaneously.");
|
||||
return;
|
||||
} else if (blocksOnly) {
|
||||
actor.print(BBC.getPrefix() + "Searching for blocks: " + query);
|
||||
@ -308,7 +308,7 @@ public class OptionsCommands {
|
||||
}
|
||||
|
||||
if (found == 0) {
|
||||
actor.printError("No items found.");
|
||||
actor.printError(BBC.getPrefix() + "No items found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.command.tool;
|
||||
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
@ -62,12 +63,12 @@ public class BlockDataCyler implements DoubleActionBlockTool {
|
||||
if (!config.allowedDataCycleBlocks.isEmpty()
|
||||
&& !player.hasPermission("worldedit.override.data-cycler")
|
||||
&& !config.allowedDataCycleBlocks.contains(block.getBlockType().getId())) {
|
||||
player.printError("You are not permitted to cycle the data value of that block.");
|
||||
BBC.BLOCK_CYCLER_NO_PERM.send(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (block.getStates().keySet().isEmpty()) {
|
||||
player.printError("That block's data cannot be cycled!");
|
||||
BBC.BLOCK_CYCLER_CANNOT_CYCLE.send(player);
|
||||
} else {
|
||||
Property<?> currentProperty = selectedProperties.get(player.getUniqueId());
|
||||
|
||||
@ -88,9 +89,9 @@ public class BlockDataCyler implements DoubleActionBlockTool {
|
||||
EditSession editSession = session.createEditSession(player);
|
||||
try {
|
||||
editSession.setBlock(blockPoint, newBlock);
|
||||
player.print("Value of " + currentProperty.getName() + " is now " + currentProperty.getValues().get(index).toString());
|
||||
player.print(BBC.getPrefix() + "Value of " + currentProperty.getName() + " is now " + currentProperty.getValues().get(index).toString());
|
||||
} catch (MaxChangedBlocksException e) {
|
||||
player.printError("Max blocks change limit reached.");
|
||||
BBC.BLOCK_CYCLER_LIMIT.send(player);
|
||||
} finally {
|
||||
session.remember(editSession);
|
||||
}
|
||||
@ -101,7 +102,7 @@ public class BlockDataCyler implements DoubleActionBlockTool {
|
||||
index = (index + 1) % properties.size();
|
||||
currentProperty = properties.get(index);
|
||||
selectedProperties.put(player.getUniqueId(), currentProperty);
|
||||
player.print("Now cycling " + currentProperty.getName());
|
||||
player.print(BBC.getPrefix() + "Now cycling " + currentProperty.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.command.tool;
|
||||
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
@ -75,7 +76,7 @@ public class BlockReplacer implements DoubleActionBlockTool {
|
||||
|
||||
if (type != null) {
|
||||
this.pattern = targetBlock;
|
||||
player.print("Replacer tool switched to: " + type.getName());
|
||||
player.print(BBC.getPrefix() + "Replacer tool switched to: " + type.getName());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user