mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Optional second argument to /tpaccept, it will only accept the request if the sender matched that string.
This commit is contained in:
parent
c47c008871
commit
6a5fefb102
2 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue