Fix further AME(s) in /home (#3444)

This commit is contained in:
Josh Roy 2020-07-02 17:58:40 -04:00 committed by GitHub
parent 024c56efdd
commit 65f88834ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ public class Commandhome extends EssentialsCommand {
}
goHome(user, player, homeName.toLowerCase(Locale.ENGLISH), charge, getNewExceptionFuture(user.getSource(), commandLabel));
} catch (NotEnoughArgumentsException e) {
if (!player.getBase().isOnline() || player.getBase() instanceof OfflinePlayer) {
throw new Exception(tl("bedOffline"));
}
final User finalPlayer = player;
PaperLib.getBedSpawnLocationAsync(player.getBase(), true).thenAccept(bed -> {
final List<String> homes = finalPlayer.getHomes();