diff options
author | syeyoung <cyoung06@naver.com> | 2021-10-04 15:49:10 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2021-10-04 15:49:10 +0900 |
commit | aee4fef35ab572c9db73d5c01ff2290fbb7a3dba (patch) | |
tree | 374a56b3e0ace0cb05066802b0d20e750070b236 /src/main/java | |
parent | 523420265f95cb5e5e60e1749ced74a9082e75dd (diff) | |
download | Skyblock-Dungeons-Guide-aee4fef35ab572c9db73d5c01ff2290fbb7a3dba.tar.gz Skyblock-Dungeons-Guide-aee4fef35ab572c9db73d5c01ff2290fbb7a3dba.tar.bz2 Skyblock-Dungeons-Guide-aee4fef35ab572c9db73d5c01ff2290fbb7a3dba.zip |
- multiple notes if pf
Diffstat (limited to 'src/main/java')
2 files changed, 19 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinderSettings.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinderSettings.java index 0d132648..8dad627c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinderSettings.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinderSettings.java @@ -265,9 +265,20 @@ public class PanelPartyFinderSettings extends MPanelScaledGUI { } if (integerSelection.getData() >dLV) return false; - if (!filterBlacklist.getText().isEmpty() && note.toLowerCase().contains(filterBlacklist.getText().toLowerCase())) return false; - if (!filterWhitelist.getText().isEmpty() && !note.toLowerCase().contains(filterWhitelist.getText().toLowerCase())) return false; - + if (!filterBlacklist.getText().isEmpty()) { + for (String s1 : filterBlacklist.getText().split(",")) { + if (note.toLowerCase().contains(s1.toLowerCase())) return false; + } + } + if (!filterWhitelist.getText().isEmpty()) { + boolean s = false; + for (String s1 : filterWhitelist.getText().split(",")) { + if (note.toLowerCase().contains(s1.toLowerCase())) { + s = true; break; + } + } + if (!s) return false; + } return true; } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java index a64eb3b8..5fbfa565 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyListElement.java @@ -101,8 +101,11 @@ public class PanelPartyListElement extends MPanel { note = note.replaceAll("(?i)(carry)", "§4$1§r"); try { - if (!panelPartyFinder.getHighlightNote().isEmpty()) - note = note.replaceAll("(?i)(" + panelPartyFinder.getHighlightNote() + ")", "§e§l$1§r"); + if (!panelPartyFinder.getHighlightNote().isEmpty()) { + for (String s1 : panelPartyFinder.getHighlightNote().split(",")) { + note = note.replaceAll("(?i)(" + s1 + ")", "§e§l$1§r"); + } + } } catch (Exception e) {} if (cantjoin) {} |