mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Check if getTeleportRequest() is null in /tpdeny
. Fixes #1229.
This commit is contained in:
parent
747420b4c8
commit
4bfabaa1d3
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@ public class Commandtpdeny extends EssentialsCommand {
|
|||
|
||||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
if (user.getTeleportRequest() == null) {
|
||||
throw new Exception(tl("noPendingRequest"));
|
||||
}
|
||||
final User player = ess.getUser(user.getTeleportRequest());
|
||||
if (player == null) {
|
||||
throw new Exception(tl("noPendingRequest"));
|
||||
|
|
Loading…
Reference in a new issue