Add prefixes and make FAWE more translatable

This commit is contained in:
NotMyFault
2019-04-07 01:13:23 +02:00
parent 6558e549fd
commit ab3394c35e
16 changed files with 110 additions and 90 deletions

View File

@@ -19,6 +19,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.config.BBC;
import com.sk89q.worldedit.LocalConfiguration;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.entity.Player;
@@ -87,7 +88,7 @@ public class DistanceWand extends BrushTool implements DoubleActionTraceTool {
}
if (target == null) {
player.printError("No block in sight!");
BBC.NO_BLOCK.send(player);
return null;
}

View File

@@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import com.boydti.fawe.object.collection.BlockVectorSet;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.object.collection.LocalBlockVectorSet;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalConfiguration;
@@ -75,7 +76,7 @@ public class FloatingTreeRemover implements BlockTool {
final BlockState state = world.getBlock(clicked.toVector().toBlockPoint());
if (!isTreeBlock(state.getBlockType())) {
player.printError("That's not a tree.");
BBC.TOOL_DELTREE_ERROR.send(player);
return true;
}
@@ -83,7 +84,7 @@ public class FloatingTreeRemover implements BlockTool {
try {
final Set<BlockVector3> blockSet = bfs(world, clicked.toVector().toBlockPoint());
if (blockSet == null) {
player.printError("That's not a floating tree.");
BBC.TOOL_DELTREE_FLOATING_ERROR.send(player);
return true;
}

View File

@@ -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;
@@ -60,10 +61,10 @@ public class TreePlanter implements BlockTool {
}
if (!successful) {
player.printError("A tree can't go there.");
BBC.TOOL_TREE_ERROR_BLOCK.send(player);
}
} catch (MaxChangedBlocksException e) {
player.printError("Max. blocks changed reached.");
BBC.WORLDEDIT_CANCEL_REASON_MAX_CHANGES.send(player);
} finally {
session.remember(editSession);
}