From 209afec56073cfbcf203edf64b649deb5bda03be Mon Sep 17 00:00:00 2001 From: Francisco Solis Date: Thu, 16 Sep 2021 19:10:47 -0300 Subject: [PATCH] Fixed BrowserGui Search --- CHANGELOG.md | 6 ++++++ pom.xml | 2 +- .../theprogramsrc/supercoreapi/spigot/gui/BrowserGui.java | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c8508bb..700e0fc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ +## v5.2.4 Changelog: +``` +* Fixed BrowserGui Search +``` + ## v5.2.3 Changelog: ``` * Deprecated SimpleItem#setOwner * Now javadoc is hosted on github pages ``` + ## v5.2.2 Changelog: ``` * Fix to the Settings Gui diff --git a/pom.xml b/pom.xml index aed2b918..6663c0a1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ xyz.theprogramsrc SuperCoreAPI - 5.2.3 + 5.2.4 jar SuperCoreAPI diff --git a/src/main/java/xyz/theprogramsrc/supercoreapi/spigot/gui/BrowserGui.java b/src/main/java/xyz/theprogramsrc/supercoreapi/spigot/gui/BrowserGui.java index c41dd6cd..dbba7c38 100644 --- a/src/main/java/xyz/theprogramsrc/supercoreapi/spigot/gui/BrowserGui.java +++ b/src/main/java/xyz/theprogramsrc/supercoreapi/spigot/gui/BrowserGui.java @@ -53,7 +53,7 @@ public void onBuild(GuiModel model) { String[] tags = this.getSearchTags(obj); if(tags == null || this.searchTerm == null) return true; if(tags.length == 0) return true; - return Arrays.stream(tags).anyMatch(tag -> this.getSuperUtils().removeColor(this.searchTerm).contains(this.getSuperUtils().removeColor(tag))); + return Arrays.stream(tags).anyMatch(tag -> this.getSuperUtils().removeColor(tag).contains(this.getSuperUtils().removeColor(this.searchTerm))); }).collect(Collectors.toList())); int offset = this.page * this.maxItemsPerPage; int itemsToTake = Math.min(offset + this.maxItemsPerPage, objects.size());