mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 11:54:35 +08: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
@ -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 New Issue
Block a user