diff options
author | syeyoung <cyoung06@naver.com> | 2021-11-06 17:04:54 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2021-11-06 17:04:54 +0900 |
commit | c61223d4f4d233e14780547393fd4bb9a0efdd4d (patch) | |
tree | 473619d440dd800a6c1dd2b8e9f145059c23ea75 /src/main/java/kr/syeyoung/dungeonsguide/cosmetics | |
parent | 06914fae35045a7f14a627ad3d55c8395801e18f (diff) | |
download | Skyblock-Dungeons-Guide-c61223d4f4d233e14780547393fd4bb9a0efdd4d.tar.gz Skyblock-Dungeons-Guide-c61223d4f4d233e14780547393fd4bb9a0efdd4d.tar.bz2 Skyblock-Dungeons-Guide-c61223d4f4d233e14780547393fd4bb9a0efdd4d.zip |
- Remove unnecessary cast
- /viewprofilemenu getting detected as /viewprofie
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/cosmetics')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java index 56430480..dd5bbd70 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java @@ -36,7 +36,7 @@ public class ChatReplacerViewProfile implements IChatReplacer { @Override public boolean isAcceptable(ClientChatReceivedEvent event) { for (IChatComponent sibling : event.message.getSiblings()) { - if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile")) return true; + if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile ")) return true; } return false; } @@ -45,7 +45,7 @@ public class ChatReplacerViewProfile implements IChatReplacer { public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) { List<Tuple<IChatComponent, IChatComponent>> replaceMents = new ArrayList<>(); for (IChatComponent sibling : event.message.getSiblings()) { - if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile")) { + if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile ")) { String uid = sibling.getChatStyle().getChatClickEvent().getValue().split(" ")[1]; List<ActiveCosmetic> cDatas = cosmeticsManager.getActiveCosmeticByPlayer().get(UUID.fromString(uid)); |