Future Java versions may not support _ as identifier.

This commit is contained in:
FearFree 2014-03-20 10:54:07 -05:00 committed by Chris Ward
parent 0b5718f7ff
commit 5724c0c8df
176 changed files with 1032 additions and 1028 deletions

View file

@ -1,6 +1,6 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import org.bukkit.Server;
@ -27,24 +27,24 @@ public class Commandtpa extends EssentialsCommand
}
if (!player.isTeleportEnabled())
{
throw new Exception(_("teleportDisabled", player.getDisplayName()));
throw new Exception(tl("teleportDisabled", player.getDisplayName()));
}
if (user.getWorld() != player.getWorld() && ess.getSettings().isWorldTeleportPermissions()
&& !user.isAuthorized("essentials.worlds." + player.getWorld().getName()))
{
throw new Exception(_("noPerm", "essentials.worlds." + player.getWorld().getName()));
throw new Exception(tl("noPerm", "essentials.worlds." + player.getWorld().getName()));
}
if (!player.isIgnoredPlayer(user))
{
player.requestTeleport(user, false);
player.sendMessage(_("teleportRequest", user.getDisplayName()));
player.sendMessage(_("typeTpaccept"));
player.sendMessage(_("typeTpdeny"));
player.sendMessage(tl("teleportRequest", user.getDisplayName()));
player.sendMessage(tl("typeTpaccept"));
player.sendMessage(tl("typeTpdeny"));
if (ess.getSettings().getTpaAcceptCancellation() != 0)
{
player.sendMessage(_("teleportRequestTimeoutInfo", ess.getSettings().getTpaAcceptCancellation()));
player.sendMessage(tl("teleportRequestTimeoutInfo", ess.getSettings().getTpaAcceptCancellation()));
}
}
user.sendMessage(_("requestSent", player.getDisplayName()));
user.sendMessage(tl("requestSent", player.getDisplayName()));
}
}