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>
This commit is contained in:
l1ttleO 2021-04-18 19:08:07 +05:00 committed by GitHub
parent 5171215817
commit 2c68d1b866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}