aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
-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++;