Skip to content

Commit

Permalink
Show all errors if map not specified.
Browse files Browse the repository at this point in the history
Signed-off-by: ThatOneTqnk <[email protected]>
  • Loading branch information
chatasma authored and Electroid committed Nov 1, 2019
1 parent dd95d58 commit c48a339
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/tc/oc/pgm/commands/MapDevelopmentCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ public static void errorsCommand(
throws CommandException {
Multimap<PGMMap, PGMMap.MapLogRecord> errors = getErrors();
Multimap<PGMMap, PGMMap.MapLogRecord> filtered = ArrayListMultimap.create();
filtered.putAll(map, errors.get(map));
errors = filtered;

if (map != null) {
filtered.putAll(map, errors.get(map));
errors = filtered;
}

new PrettyPaginatedResult<Entry<PGMMap, MapLogRecord>>(
map == null ? "Map Errors" : map.getName() + " Errors") {
map == null ? "Errors" : map.getName() + " Errors") {
@Override
public String format(Map.Entry<PGMMap, PGMMap.MapLogRecord> entry, int index) {
return entry.getValue().getLegacyFormattedMessage();
Expand Down

0 comments on commit c48a339

Please sign in to comment.