mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-08 13:33:24 +00:00
Continuing code cleanup
This commit is contained in:
parent
fc00ff471d
commit
cd9ea163e4
28 changed files with 223 additions and 229 deletions
|
@ -13,21 +13,21 @@ public class Commandtpahere extends EssentialsCommand
|
|||
}
|
||||
|
||||
@Override
|
||||
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
if (args.length < 1)
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
User p = getPlayer(server, args, 0);
|
||||
if (!p.isTeleportEnabled())
|
||||
final User player = getPlayer(server, args, 0);
|
||||
if (!player.isTeleportEnabled())
|
||||
{
|
||||
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
|
||||
throw new Exception(Util.format("teleportDisabled", player.getDisplayName()));
|
||||
}
|
||||
p.requestTeleport(user, true);
|
||||
p.sendMessage(Util.format("teleportHereRequest", user.getDisplayName()));
|
||||
p.sendMessage(Util.i18n("typeTpaccept"));
|
||||
user.sendMessage(Util.format("requestSent", p.getDisplayName()));
|
||||
player.requestTeleport(user, true);
|
||||
player.sendMessage(Util.format("teleportHereRequest", user.getDisplayName()));
|
||||
player.sendMessage(Util.i18n("typeTpaccept"));
|
||||
user.sendMessage(Util.format("requestSent", player.getDisplayName()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue