Skip to content

Commit

Permalink
Merge pull request CytonicMC#217 from Foxikle/feat/friends
Browse files Browse the repository at this point in the history
final touches
  • Loading branch information
webhead1104 authored Jul 12, 2024
2 parents 4580153 + 70e1cc1 commit fbdfe0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/net/cytonic/cytosis/commands/FriendCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public FriendCommand() {
}
if (s.equalsIgnoreCase("ALREADY_SENT")) {
player.sendMessage(MM."<red><b>ERROR!</b></red> <gray>You have already sent a friend request to ".append(targetComp).append(MM."<gray>!"));
} else {
} else if (s.equalsIgnoreCase("INVALID_TOKEN")) {
player.sendMessage(MM."<red><b>SERVER ERROR!</b></red> <gray>\{s}");
}
});
Expand All @@ -143,7 +143,8 @@ public FriendCommand() {
case "UNAUTHORIZED" ->
player.sendMessage(MM."<red><b>ERROR!</b></red> <gray>For some reason, you don't have permission to accept a friend request from ".append(targetComp).append(MM."<gray>!"));
case "OK" -> Cytosis.getFriendManager().addFriend(player.getUuid(), finalTarget);
default -> player.sendMessage(MM."<red><b>SERVER ERROR!</b></red> <gray>\{s}");
case "INVALID_TOKEN" ->
player.sendMessage(MM."<red><b>SERVER ERROR!</b></red> <gray>\{s}");
}
});
case "decline" ->
Expand All @@ -153,7 +154,7 @@ public FriendCommand() {
}
if (s.equalsIgnoreCase("NOT_FOUND")) {
player.sendMessage(MM."<red><b>ERROR!</b></red> <gray>You don't have an active friend request from ".append(targetComp).append(MM."<gray>!"));
} else {
} else if (s.equalsIgnoreCase("INVALID_TOKEN")) {
player.sendMessage(MM."<red><b>SERVER ERROR!</b></red> <gray>\{s}");
}
});
Expand Down

0 comments on commit fbdfe0c

Please sign in to comment.