Skip to content

Commit

Permalink
Fix as me command to have the player arg be properly optional
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Aug 4, 2024
1 parent e5d190d commit 5742dd6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ private void handleCommand(@Nonnull CommandContext<PlayerCommandSource> context)
if (!sender.hasPermission("areashop.me")) {
throw new AreaShopCommandException("me-noPermission");
}
if (!context.contains(KEY_PLAYER)) {
RegionInfoUtil.showRegionInfo(this.messageBridge, this.fileManager, sender, sender);
return;
}
this.offlinePlayerHelper.lookupOfflinePlayerAsync(context.get(KEY_PLAYER))
.whenCompleteAsync((offlinePlayer, exception) -> {
if (exception != null) {
Expand Down

0 comments on commit 5742dd6

Please sign in to comment.