Skip to content

Commit

Permalink
temporarily disable the reset map command when ran as player
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Jul 22, 2024
1 parent 5b3b41a commit bbd3aaf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ private void executeAsync(@NotNull CommandContext<@NotNull Sender> context) {
Sender sender = context.sender();
World world = context.get("world");

// TODO: Look into why it seems to inconsistently initialize the world twice when called as a player :/
if (sender instanceof Sender.Player<?> player) {
sender.sendMessage("<yellow>Resetting the map in-game is temporarily disabled. Please run this command in the console instead.");
return;
}

TagResolver.Single worldPlaceholder = Placeholder.unparsed("world", world.getName());
sender.sendMessage(Lang.COMMAND_RESETMAP_BEGIN, worldPlaceholder);

Expand Down

0 comments on commit bbd3aaf

Please sign in to comment.