Skip to content

Commit

Permalink
fix: still show feedback if no regions affected by cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson committed Jun 11, 2024
1 parent a60df65 commit f1b358e
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ private static boolean executeRegionDataGet(CommandContext<ServerCommandSource>
Text.translatable("text.nucleoid_creator_tools.map.region.data.get", region.marker(), formatNbt(region.data()))
);
}, false);
return false;
return true;
}

private static boolean executeRegionDataMerge(CommandContext<ServerCommandSource> context, MapWorkspace map, WorkspaceRegion region) {
Expand Down Expand Up @@ -598,9 +598,14 @@ private static Command<ServerCommandSource> executeInRegions(String message, Reg
}

if (count > 0) {
int finalCount = count;
source.sendFeedback(() -> withMapPrefix(map, Text.literal(String.format(message, finalCount))), false);
if (!message.isEmpty()) {
int finalCount = count;
source.sendFeedback(() -> withMapPrefix(map, Text.literal(String.format(message, finalCount))), false);
}
} else {
source.sendFeedback(() -> withMapPrefix(map, Text.literal("No regions affected.")), false);
}

return 2;
};
}
Expand Down

0 comments on commit f1b358e

Please sign in to comment.