mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-26 01:01:45 +01:00
Check if getTeleportRequest() is null in /tpdeny
. Fixes #1229.
This commit is contained in:
parent
747420b4c8
commit
4bfabaa1d3
@ -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 New Issue
Block a user