summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-01-29 04:59:30 +0000
committerKHobbits <rob@khobbits.co.uk>2012-01-29 04:59:30 +0000
commit67e482898455464b590943db008b067f94cb4232 (patch)
treea37302ef003f5ae8cd9b4fd2797a1dc1a15efff5
parentb4ce35bafc16145206015598584d863b0a1c88a7 (diff)
downloadEssentials-67e482898455464b590943db008b067f94cb4232.tar
Essentials-67e482898455464b590943db008b067f94cb4232.tar.gz
Essentials-67e482898455464b590943db008b067f94cb4232.tar.lz
Essentials-67e482898455464b590943db008b067f94cb4232.tar.xz
Essentials-67e482898455464b590943db008b067f94cb4232.zip
Optional second argument to /tpaccept, it will only accept the request if the sender matched that string.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java5
-rw-r--r--Essentials/src/plugin.yml2
2 files changed, 6 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
index 0cece3310..2e3e024a3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java
@@ -26,6 +26,11 @@ public class Commandtpaccept extends EssentialsCommand
{
throw new Exception(_("noPendingRequest"));
}
+
+ if (args.length > 0 && !target.getName().contains(args[0]))
+ {
+ throw new Exception(_("noPendingRequest"));
+ }
long timeout = ess.getSettings().getTpaAcceptCancellation();
if (timeout != 0 && (System.currentTimeMillis() - user.getTeleportRequestTime()) / 1000 > timeout)
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index 7d8db28bb..0ec1ee6d9 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -348,7 +348,7 @@ commands:
aliases: [etpaall]
tpaccept:
description: Accepts a teleport request.
- usage: /<command>
+ usage: /<command> [otherplayer]
aliases: [tpyes,etpaccept,etpyes]
tpahere:
description: Request that the specified player teleport to you.