From d9f3208d43adc9c490c2fa3f3b51e4da8f9ef794 Mon Sep 17 00:00:00 2001 From: ceulemansl Date: Sat, 2 Apr 2011 23:21:45 +0000 Subject: [PATCH] [Warp] signes. Format: [Warp] warp-name Free/group/empty(then need permission to use) git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1094 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../essentials/EssentialsPlayerListener.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 47c6ac852..b8a82cd1a 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -339,9 +339,31 @@ public class EssentialsPlayerListener extends PlayerListener } if (sign.getLine(0).equals("§1[Balance]") && user.isAuthorized("essentials.signs.balance.use")) { - user.sendMessage("§7Balance: $" + user.getMoney()); + user.sendMessage("§7Balance: $" + user.getMoney()); return; } + if (sign.getLine(0).equals("§1[Warp]")) + { + if (!sign.getLine(2).isEmpty()) + { + if (sign.getLine(2).equals("§2Free")) + { + user.teleportCooldown(); + user.warpTo(sign.getLine(1)); + return; + } + if (user.getGroup() == sign.getLine(2)) + { + user.teleportCooldown(); + user.warpTo(sign.getLine(1)); + return; + } + } + if (user.isAuthorized("essentials.signs.warp.use")) + user.teleportCooldown(); + user.warpTo(sign.getLine(1)); + return; + } } catch (Throwable ex) {