From 2c68d1b866332211636ba84a0604630b7658192a Mon Sep 17 00:00:00 2001 From: l1ttleO Date: Sun, 18 Apr 2021 19:08:07 +0500 Subject: [PATCH] Fix /pay working on vanished players (#4114) Vanished players are now treated as offline players. Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com> --- .../main/java/com/earth2me/essentials/commands/Commandpay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java index 7d8ffed0e..ecc6a4207 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java @@ -50,7 +50,7 @@ public class Commandpay extends EssentialsLoopCommand { } loopOfflinePlayersConsumer(server, user.getSource(), false, user.isAuthorized("essentials.pay.multiple"), args[0], player -> { try { - if (player.getBase() != null && !player.getBase().isOnline() && !canPayOffline) { + if (player.getBase() != null && (!player.getBase().isOnline() || player.isHidden(user.getBase())) && !canPayOffline) { user.sendMessage(tl("payOffline")); return; }