Optional second argument to /tpaccept, it will only accept the request if the sender matched that string.

This commit is contained in:
KHobbits 2012-01-29 04:59:30 +00:00
parent c47c008871
commit 6a5fefb102
2 changed files with 6 additions and 1 deletions

View file

@ -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)

View file

@ -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.