- Make disallowed-blocks translatable
- Add more trnslatable messages
- Update WorldEdit messages missing a prefix
This commit is contained in:
NotMyFault
2019-04-11 19:49:09 +02:00
parent 7a88039711
commit dcfa436c64
10 changed files with 30 additions and 20 deletions

View File

@ -20,6 +20,7 @@
package com.sk89q.worldedit.util.command;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.util.StringMan;
import com.google.common.base.Joiner;
import com.sk89q.minecraft.util.commands.CommandException;
@ -141,7 +142,7 @@ public class SimpleDispatcher implements Dispatcher {
}
throw new InvalidUsageException("Please choose a sub-command.", this, true);
throw new InvalidUsageException(BBC.getPrefix() + "Please choose a sub-command.", this, true);
}
@Override

View File

@ -1,5 +1,6 @@
package com.sk89q.worldedit.util.command.parametric;
import com.boydti.fawe.config.BBC;
import com.boydti.fawe.util.StringMan;
import com.google.common.primitives.Chars;
import com.sk89q.minecraft.util.commands.*;
@ -276,14 +277,14 @@ public class FunctionParametricCallable extends AParametricCallable {
}
return result;
} catch (MissingParameterException e) {
throw new InvalidUsageException("Too few parameters!", this, true);
throw new InvalidUsageException(BBC.getPrefix() + "Too few parameters!", this, true);
} catch (UnconsumedParameterException e) {
throw new InvalidUsageException("Too many parameters! Unused parameters: " + e.getUnconsumed(), this, true);
throw new InvalidUsageException(BBC.getPrefix() + "Too many parameters! Unused parameters: " + e.getUnconsumed(), this, true);
} catch (ParameterException e) {
assert parameter != null;
String name = parameter.getName();
throw new InvalidUsageException("For parameter '" + name + "': " + e.getMessage(), this, true);
throw new InvalidUsageException(BBC.getPrefix() + "For parameter '" + name + "': " + e.getMessage(), this, true);
} catch (InvocationTargetException e) {
if (e.getCause() instanceof CommandException) {
throw (CommandException) e.getCause();

View File

@ -20,6 +20,7 @@
package com.sk89q.worldedit.util.command.parametric;
import com.boydti.fawe.command.SuggestInputParseException;
import com.boydti.fawe.config.BBC;
import com.google.common.primitives.Chars;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
@ -270,9 +271,9 @@ public class ParametricCallable extends AParametricCallable {
}
return result;
} catch (MissingParameterException e) {
throw new InvalidUsageException("Too few parameters!", this, true);
throw new InvalidUsageException(BBC.getPrefix() + "Too few parameters!", this, true);
} catch (UnconsumedParameterException e) {
throw new InvalidUsageException("Too many parameters! Unused parameters: " + e.getUnconsumed(), this, true);
throw new InvalidUsageException(BBC.getPrefix() + "Too many parameters! Unused parameters: " + e.getUnconsumed(), this, true);
} catch (ParameterException e) {
assert parameter != null;
String name = parameter.getName();