mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-23 12:39:24 +08:00
Add missing language pointers
This commit is contained in:
parent
c59a204827
commit
077074c855
@ -79,10 +79,9 @@ public class Commandgamemode extends EssentialsCommand
|
||||
|
||||
private void gamemodeOtherPlayers(final Server server, final CommandSource sender, final GameMode gameMode, final String name) throws NotEnoughArgumentsException, PlayerNotFoundException
|
||||
{
|
||||
//TODO: TL this
|
||||
if (name.trim().length() < 2 || gameMode == null)
|
||||
{
|
||||
throw new NotEnoughArgumentsException("You need to specify a valid player/mode.");
|
||||
throw new NotEnoughArgumentsException(_("gameModeInvalid"));
|
||||
}
|
||||
|
||||
boolean skipHidden = sender.isPlayer() && !ess.getUser(sender.getPlayer()).isAuthorized("essentials.vanish.interact");
|
||||
|
@ -1,13 +1,15 @@
|
||||
package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.CommandSource;
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.utils.FormatUtil;
|
||||
import com.earth2me.essentials.utils.StringUtil;
|
||||
import java.util.List;
|
||||
import org.bukkit.Server;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
|
||||
|
||||
public class Commandmail extends EssentialsCommand
|
||||
{
|
||||
@ -60,7 +62,7 @@ public class Commandmail extends EssentialsCommand
|
||||
final String mail = user.getName() + ": " + StringUtil.sanitizeString(FormatUtil.stripFormat(getFinalArg(args, 2)));
|
||||
if (mail.length() > 1000)
|
||||
{
|
||||
throw new Exception("Mail message too long. Try to keep it below 1000");
|
||||
throw new Exception(_("mailTooLong"));
|
||||
}
|
||||
if (Math.abs(System.currentTimeMillis() - timestamp) > 60000)
|
||||
{
|
||||
@ -70,7 +72,7 @@ public class Commandmail extends EssentialsCommand
|
||||
mailsPerMinute++;
|
||||
if (mailsPerMinute > ess.getSettings().getMailsPerMinute())
|
||||
{
|
||||
throw new Exception("Too many mails have been send within the last minute. Maximum: " + ess.getSettings().getMailsPerMinute());
|
||||
throw new Exception(_("mailDelay", ess.getSettings().getMailsPerMinute()));
|
||||
}
|
||||
u.addMail(mail);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class Commandtp extends EssentialsCommand
|
||||
final double z = args[3].startsWith("~") ? target2.getLocation().getZ() + Integer.parseInt(args[3].substring(1)) : Integer.parseInt(args[3]);
|
||||
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
|
||||
{
|
||||
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
|
||||
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
|
||||
}
|
||||
final Location loc = new Location(target2.getWorld(), x, y, z, target2.getLocation().getYaw(), target2.getLocation().getPitch());
|
||||
if (!target2.isTeleportEnabled())
|
||||
@ -111,7 +111,7 @@ public class Commandtp extends EssentialsCommand
|
||||
final double z = args[3].startsWith("~") ? target.getLocation().getZ() + Integer.parseInt(args[3].substring(1)) : Integer.parseInt(args[3]);
|
||||
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
|
||||
{
|
||||
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
|
||||
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
|
||||
}
|
||||
final Location loc = new Location(target.getWorld(), x, y, z, target.getLocation().getYaw(), target.getLocation().getPitch());
|
||||
target.getTeleport().now(loc, false, TeleportCause.COMMAND);
|
||||
|
@ -38,7 +38,7 @@ public class Commandtppos extends EssentialsCommand
|
||||
}
|
||||
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
|
||||
{
|
||||
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
|
||||
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
|
||||
}
|
||||
final Trade charge = new Trade(this.getName(), ess);
|
||||
charge.isAffordableFor(user);
|
||||
@ -70,7 +70,7 @@ public class Commandtppos extends EssentialsCommand
|
||||
}
|
||||
if (x > 30000000 || y > 30000000 || z > 30000000 || x < -30000000 || y < -30000000 || z < -30000000)
|
||||
{
|
||||
throw new NotEnoughArgumentsException("Value of coordinates cannot be over 30000000"); //TODO: I18n
|
||||
throw new NotEnoughArgumentsException(_("teleportInvalidLocation"));
|
||||
}
|
||||
sender.sendMessage(_("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||
user.sendMessage(_("teleporting", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||
|
@ -58,7 +58,6 @@ public class Commandweather extends EssentialsCommand
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Translate these
|
||||
@Override
|
||||
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
@ -71,7 +70,7 @@ public class Commandweather extends EssentialsCommand
|
||||
final World world = server.getWorld(args[0]);
|
||||
if (world == null)
|
||||
{
|
||||
throw new Exception("World named " + args[0] + " not found!");
|
||||
throw new Exception(_("weatherInvalidWorldWorld", args[0]));
|
||||
}
|
||||
if (args.length > 2)
|
||||
{
|
||||
|
@ -539,4 +539,9 @@ skullChanged=\u00a76Skull changed to \u00a7c{0}.\u00a76.
|
||||
alphaNames=\u00a74Player names can only contain letters, numbers and underscores.
|
||||
givenSkull=\u00a76You have been given the Skull of \u00a7c{0}\u00a76.
|
||||
noPermissionSkull=\u00a74You do not have permission to modify that Skull.
|
||||
invalidSkull=\u00a74Please hold a player Skull.
|
||||
teleportInvalidLocation=Value of coordinates cannot be over 30000000
|
||||
invalidSkull=\u00a74Please hold a player Skull.
|
||||
weatherInvalidWorld=World named {0} not found!
|
||||
gameModeInvalid=\u00a74You need to specify a valid player/mode.
|
||||
mailTooLong=\u00a74Mail message too long. Try to keep it below 1000
|
||||
mailDelay=Too many mails have been sent within the last minute. Maximum\: {0}
|
Loading…
Reference in New Issue
Block a user