aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-05-08 23:45:05 +0900
committersyeyoung <cyong06@naver.com>2021-05-08 23:45:05 +0900
commit5b2b5abf56d992de12900044ba8f003c1aadb10c (patch)
tree94fa9af5cda74e194807b3677a86096603e50812 /src/main/java/kr/syeyoung/dungeonsguide/features/impl
parent12f90f5467f3a2f29339f68d997a5ac647c49db2 (diff)
downloadSkyblock-Dungeons-Guide-5b2b5abf56d992de12900044ba8f003c1aadb10c.tar.gz
Skyblock-Dungeons-Guide-5b2b5abf56d992de12900044ba8f003c1aadb10c.tar.bz2
Skyblock-Dungeons-Guide-5b2b5abf56d992de12900044ba8f003c1aadb10c.zip
Fix being able to crash while choosing cosmetics
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java
index b0c2987f..eca6228a 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java
@@ -148,15 +148,19 @@ public class PrefixSelectorGUI extends MPanel {
selected = value;
return;
}
- if (new Rectangle(161,cnt * (fr.FONT_HEIGHT+4) + 2,58,fr.FONT_HEIGHT+1).contains(relX, relY) && cosmeticsManager.getPerms().contains(value.getReqPerm())) {
- for (ActiveCosmetic activeCosmetic : activeCosmeticList) {
- if (activeCosmetic.getCosmeticData().equals(value.getId())) {
- cosmeticsManager.removeCosmetic(activeCosmetic);
- return;
+ try {
+ if (new Rectangle(161, cnt * (fr.FONT_HEIGHT + 4) + 2, 58, fr.FONT_HEIGHT + 1).contains(relX, relY) && cosmeticsManager.getPerms().contains(value.getReqPerm())) {
+ for (ActiveCosmetic activeCosmetic : activeCosmeticList) {
+ if (activeCosmetic.getCosmeticData().equals(value.getId())) {
+ cosmeticsManager.removeCosmetic(activeCosmetic);
+ return;
+ }
}
+ cosmeticsManager.setCosmetic(value);
+ selected = value;
}
- cosmeticsManager.setCosmetic(value);
- selected = value;
+ } catch (Exception e) {
+ e.printStackTrace();
}
cnt++;