diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryOverlay.java index 2b40c99f95..fb60cb0262 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryOverlay.java @@ -138,7 +138,7 @@ class KourendLibraryOverlay extends Overlay Color color = bookIsKnown ? Color.ORANGE : Color.WHITE; // Render the poly on the floor - if (!(bookIsKnown && book == null) && (library.getState() == SolvedState.NO_DATA || book != null || !possible.isEmpty()) && !shouldHideOverlayIfDuplicateBook(book)) + if (!(bookIsKnown && book == null) && (library.getState() == SolvedState.NO_DATA || book != null || !possible.isEmpty()) && shouldShowOverlayIfDuplicateBook(book)) { Polygon poly = getCanvasTilePoly(client, localBookcase); if (poly != null) @@ -151,7 +151,7 @@ class KourendLibraryOverlay extends Overlay // If the book is singled out, render the text and the book's icon if (bookIsKnown) { - if (book != null && !shouldHideOverlayIfDuplicateBook(book)) + if (book != null && shouldShowOverlayIfDuplicateBook(book)) { FontMetrics fm = g.getFontMetrics(); Rectangle2D bounds = fm.getStringBounds(book.getShortName(), g); @@ -239,11 +239,11 @@ class KourendLibraryOverlay extends Overlay return null; } - private boolean shouldHideOverlayIfDuplicateBook(@Nullable Book book) + private boolean shouldShowOverlayIfDuplicateBook(@Nullable Book book) { - return plugin.isHideDuplicateBook() - && book != null - && !book.isDarkManuscript() - && plugin.doesPlayerContainBook(book); + return !plugin.isHideDuplicateBook() + || book == null + || book.isDarkManuscript() + || !plugin.doesPlayerContainBook(book); } }