mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
[trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1422 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
bcd6e272ad
commit
299be08d13
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
||||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandme extends EssentialsCommand
|
||||
@ -16,7 +17,7 @@ public class Commandme extends EssentialsCommand
|
||||
{
|
||||
if (user.isMuted())
|
||||
{
|
||||
user.sendMessage("§7Your voice has been silenced");
|
||||
user.sendMessage(Util.i18n("voiceSilenced"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
@ -15,7 +16,7 @@ public class Commandmotd extends EssentialsCommand
|
||||
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||
{
|
||||
charge(sender);
|
||||
for (String m : ess.getMotd(sender, "§cThere is no message of the day."))
|
||||
for (String m : ess.getMotd(sender, Util.i18n("noMotd")))
|
||||
{
|
||||
sender.sendMessage(m);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.Server;
|
||||
import org.bukkit.entity.Player;
|
||||
import com.earth2me.essentials.Console;
|
||||
import com.earth2me.essentials.IReplyTo;
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
|
||||
@ -24,15 +25,16 @@ public class Commandmsg extends EssentialsCommand
|
||||
}
|
||||
|
||||
String message = getFinalArg(args, 1);
|
||||
String translatedMe = Util.i18n("me");
|
||||
|
||||
IReplyTo replyTo = sender instanceof Player ? ess.getUser((Player)sender) : Console.getConsoleReplyTo();
|
||||
String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
|
||||
|
||||
if (args[0].equalsIgnoreCase(Console.NAME))
|
||||
{
|
||||
sender.sendMessage("[Me -> " + Console.NAME + "§f] " + message);
|
||||
sender.sendMessage("[" + translatedMe + " -> " + Console.NAME + "§f] " + message);
|
||||
CommandSender cs = Console.getCommandSender(server);
|
||||
cs.sendMessage("[" + senderName + " -> Me§f] " + message);
|
||||
cs.sendMessage("[" + senderName + " -> " + translatedMe + "§f] " + message);
|
||||
replyTo.setReplyTo(cs);
|
||||
Console.getConsoleReplyTo().setReplyTo(sender);
|
||||
return;
|
||||
@ -42,15 +44,15 @@ public class Commandmsg extends EssentialsCommand
|
||||
|
||||
if (matches.isEmpty())
|
||||
{
|
||||
sender.sendMessage("§cThere are no players matching that name.");
|
||||
sender.sendMessage(Util.i18n("playerNotFound"));
|
||||
return;
|
||||
}
|
||||
|
||||
charge(sender);
|
||||
for (Player p : matches)
|
||||
{
|
||||
sender.sendMessage("[Me -> " + p.getDisplayName() + "§f] " + message);
|
||||
p.sendMessage("[" + senderName + " -> Me§f] " + message);
|
||||
sender.sendMessage("[" + translatedMe + " -> " + p.getDisplayName() + "§f] " + message);
|
||||
p.sendMessage("[" + senderName + " -> " + translatedMe + "§f] " + message);
|
||||
replyTo.setReplyTo(ess.getUser(p));
|
||||
ess.getUser(p).setReplyTo(sender);
|
||||
}
|
||||
|
@ -29,6 +29,8 @@ public class Commandmute extends EssentialsCommand
|
||||
}
|
||||
p.setMuteTimeout(muteTimestamp);
|
||||
charge(sender);
|
||||
sender.sendMessage("Player " + p.getDisplayName() + " " + (p.toggleMuted() ? "muted" : "unmuted") + (muteTimestamp > 0 ? " for " + Util.formatDateDiff(muteTimestamp) : "") + ".");
|
||||
|
||||
|
||||
sender.sendMessage(Util.format("mutedPlayer", p.getDisplayName(), (p.toggleMuted() ? Util.i18n("muted") : Util.i18n("unmuted")), (muteTimestamp > 0 ? Util.i18n("for") + Util.formatDateDiff(muteTimestamp) : "")));
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import org.bukkit.entity.Player;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandnick extends EssentialsCommand
|
||||
@ -26,7 +27,7 @@ public class Commandnick extends EssentialsCommand
|
||||
{
|
||||
if (!user.isAuthorized("essentials.nick.others"))
|
||||
{
|
||||
user.sendMessage("§cYou do not have permission to change the nickname of others");
|
||||
user.sendMessage(Util.i18n("nickOthersPermission"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -40,13 +41,13 @@ public class Commandnick extends EssentialsCommand
|
||||
{
|
||||
user.setDisplayName(user.getName());
|
||||
user.setNickname(null);
|
||||
user.sendMessage("§7You no longer have a nickname.");
|
||||
user.sendMessage(Util.i18n("nickNoMore"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (nick.matches("[^a-zA-Z_0-9]"))
|
||||
{
|
||||
user.sendMessage("§cNicknames must be alphanumeric.");
|
||||
user.sendMessage(Util.i18n("nickNamesAlpha"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -61,7 +62,7 @@ public class Commandnick extends EssentialsCommand
|
||||
String nk = nick.toLowerCase();
|
||||
if (nk.equals(dn) || nk.equals(n))
|
||||
{
|
||||
user.sendMessage("§cThat name is already in use.");
|
||||
user.sendMessage(Util.i18n("nickInUse"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -69,7 +70,7 @@ public class Commandnick extends EssentialsCommand
|
||||
user.charge(this);
|
||||
user.setDisplayName(ess.getConfiguration().getString("nickname-prefix", "~") + nick);
|
||||
user.setNickname(nick);
|
||||
user.sendMessage("§7Your nickname is now §c" + user.getDisplayName() + "§7.");
|
||||
user.sendMessage(Util.format("nickSet", user.getDisplayName() + "§7."));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -92,14 +93,14 @@ public class Commandnick extends EssentialsCommand
|
||||
{
|
||||
target.setDisplayName(target.getName());
|
||||
target.setNickname(null);
|
||||
target.sendMessage("§7You no longer have a nickname.");
|
||||
target.sendMessage(Util.i18n("nickNoMore"));
|
||||
}
|
||||
else
|
||||
{
|
||||
target.setDisplayName(ess.getSettings().getNicknamePrefix() + nick);
|
||||
target.setNickname(nick);
|
||||
target.sendMessage("§7Your nickname is now §c" + target.getDisplayName() + "§7.");
|
||||
target.sendMessage(Util.format("nickSet", target.getDisplayName() + "§7."));
|
||||
}
|
||||
sender.sendMessage("Nickname changed.");
|
||||
sender.sendMessage(Util.i18n("nickChanged"));
|
||||
}
|
||||
}
|
||||
|
@ -194,3 +194,16 @@ playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
||||
mailSent = \u00a77Mail sent!
|
||||
mailCleared = \u00a77Mail Cleared!
|
||||
usage = \u00a7cUsage :
|
||||
voiceSilenced = \u00a77Your voice has been silenced
|
||||
noMotd = \u00a7cThere is no message of the day."
|
||||
me = me
|
||||
mutedPlayer = Player {0} {1} {2} {3}.
|
||||
muted = muted
|
||||
unMuted = unmuted
|
||||
for = for
|
||||
nickOthersPermission = \u00a7cYou do not have permission to change the nickname of others
|
||||
nickNoMore = \u00a7You no longer have a nickname.
|
||||
nickNamesAlpha = \u00a7cNicknames must be alphanumeric.
|
||||
nickInUse = \u00a7cThat name is already in use.
|
||||
nickSet = \u00a77Your nickname is now \u00a7c{0}
|
||||
nickChanged = Nickname changed.
|
Loading…
Reference in New Issue
Block a user