From 4bfabaa1d3b81b0bc3e10ba5417eceed98e02b81 Mon Sep 17 00:00:00 2001 From: Ali Moghnieh Date: Thu, 4 May 2017 13:41:27 +0100 Subject: [PATCH] Check if getTeleportRequest() is null in `/tpdeny`. Fixes #1229. --- .../src/com/earth2me/essentials/commands/Commandtpdeny.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java index 454738df3..352f6621c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpdeny.java @@ -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"));