summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorceulemansl <ceulemansl@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-04-02 23:21:45 +0000
committerceulemansl <ceulemansl@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-04-02 23:21:45 +0000
commitd9f3208d43adc9c490c2fa3f3b51e4da8f9ef794 (patch)
treef065ccb88688970c2b94aeed4d38e5dc6f18eae9
parent7a6a0ec775b2fcc690ca522654f77518d3869f49 (diff)
downloadEssentials-d9f3208d43adc9c490c2fa3f3b51e4da8f9ef794.tar
Essentials-d9f3208d43adc9c490c2fa3f3b51e4da8f9ef794.tar.gz
Essentials-d9f3208d43adc9c490c2fa3f3b51e4da8f9ef794.tar.lz
Essentials-d9f3208d43adc9c490c2fa3f3b51e4da8f9ef794.tar.xz
Essentials-d9f3208d43adc9c490c2fa3f3b51e4da8f9ef794.zip
[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
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java24
1 files changed, 23 insertions, 1 deletions
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)
{