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