Formatting

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1235 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
zenexer 2011-04-16 19:13:53 +00:00
parent c98d81bf8c
commit da1023975b

View File

@ -17,15 +17,17 @@ public class Commandwarp extends EssentialsCommand
public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
{
boolean perWarpPermission = Essentials.getSettings().getPerWarpPermission();
if (args.length == 0) {
if (args.length == 0)
{
if (!user.isAuthorized("essentials.warp.list"))
{
user.sendMessage("§cYou do not have Permission to list that warps.");
return;
}
Warps warps = Essentials.getWarps();
if (warps.isEmpty()) {
if (warps.isEmpty())
{
throw new Exception("No warps defined");
}
StringBuilder sb = new StringBuilder();
@ -51,7 +53,8 @@ public class Commandwarp extends EssentialsCommand
return;
}
try {
try
{
if (perWarpPermission)
{
if (user.isAuthorized("essentials.warp." + args[0]))
@ -67,7 +70,9 @@ public class Commandwarp extends EssentialsCommand
user.canAfford(this);
user.teleportCooldown();
user.warpTo(args[0], this.getName());
} catch (Exception ex) {
}
catch (Exception ex)
{
user.sendMessage(ex.getMessage());
}
}