Skip to content

Commit

Permalink
equals ignore case
Browse files Browse the repository at this point in the history
  • Loading branch information
aabssmc committed Nov 9, 2024
1 parent f061882 commit 45021bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/cc/aabss/eventutils/CommandRegister.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private static void priority(@NotNull CommandContext<FabricClientCommandSource>
assert client.world != null;
int i = 1;
for (AbstractClientPlayerEntity player : client.world.getPlayers()) {
if (Objects.equals(name, player.getName().getString())) {
if (name.equalsIgnoreCase(player.getName().getString())) {
context.getSource().sendFeedback(Text.literal(name+" has pickup priority #" + i + " (based on people around you)"));
return;
}
Expand Down Expand Up @@ -142,11 +142,11 @@ private static void priority(@NotNull CommandContext<FabricClientCommandSource>
for (int i = start; i < end; i++) {
String name = namesSorted.get(i);
assert client.player != null;
if (name.equals(client.player.getName().getString())) {
if (name.equalsIgnoreCase(client.player.getName().getString())) {
builder.append("§e");
}
builder.append(i + 1).append(". ").append(namesSorted.get(i)).append("\n");
if (name.equals(client.player.getName().getString())) {
if (name.equalsIgnoreCase(client.player.getName().getString())) {
builder.append("§r");
}
}
Expand Down

0 comments on commit 45021bc

Please sign in to comment.