Skip to content

Commit

Permalink
fix deity list command
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Jan 2, 2024
1 parent 7b50b0c commit 18b685e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ private static int handleChoose(CommandContext<CommandSourceStack> source) throw

private static int handleList(CommandContext<CommandSourceStack> source) {
DeitiesManager.deities.forEach((key, data) -> {
StringBuilder domains = new StringBuilder();
data.domains.forEach((s) -> domains.append(s).append(""));
var domains = String.join(", ", data.domains);
if (data.domains.size() > 1) {
var first = data.domains.subList(0, data.domains.size() - 1);
domains = String.join(", ", first) + " and " + data.domains.get(data.domains.size() - 1);
}
source.getSource().sendSuccess(TribeSuccessType.DESCRIBE_DEITY.getBlueText(data.displayName, data.label, domains), false);
});
return Command.SINGLE_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.util.Objects;
import java.util.concurrent.CompletableFuture;

// big problem:
// FIXME big problem:
// since this uses a greedy string you can only have it as the last argument
// further thinking required on how to fix this

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.Objects;
import java.util.concurrent.CompletableFuture;

// big problem:
// FIXME big problem:
// since this uses a greedy string you can only have it as the last argument
// further thinking required on how to fix this

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.lukegrahamlandry.tribes.events;


import io.github.lukegrahamlandry.tribes.TribesMain;
import io.github.lukegrahamlandry.tribes.config.TribesConfig;
import io.github.lukegrahamlandry.tribes.init.NetworkHandler;
Expand Down

0 comments on commit 18b685e

Please sign in to comment.