From aee4fef35ab572c9db73d5c01ff2290fbb7a3dba Mon Sep 17 00:00:00 2001 From: syeyoung Date: Mon, 4 Oct 2021 15:49:10 +0900 Subject: - multiple notes if pf --- .../impl/party/customgui/PanelPartyFinderSettings.java | 17 ++++++++++++++--- .../impl/party/customgui/PanelPartyListElement.java | 7 +++++-- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features') 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) {} -- cgit