From c61223d4f4d233e14780547393fd4bb9a0efdd4d Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 6 Nov 2021 17:04:54 +0900 Subject: - Remove unnecessary cast - /viewprofilemenu getting detected as /viewprofie --- .../cosmetics/chatreplacers/ChatReplacerViewProfile.java | 4 ++-- .../java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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> 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 cDatas = cosmeticsManager.getActiveCosmeticByPlayer().get(UUID.fromString(uid)); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java index 657f3cb3..8e989855 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java @@ -57,7 +57,7 @@ public class JPSPathfinder { private Node openNode(int x, int y, int z) { int i = Node.makeHash(x, y, z); - Node node = (Node)this.nodeMap.lookup(i); + Node node = this.nodeMap.lookup(i); if (node == null) { -- cgit