Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
fix: Guild territory list occasionally causing NPE (#618)
Browse files Browse the repository at this point in the history
Co-authored-by: Incompleteusern <[email protected]>
  • Loading branch information
ryanzhoudev and Incompleteusern authored Oct 26, 2022
1 parent 331677a commit 84b3d20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void onDrawBackground(GuiOverlapEvent.ChestOverlap.DrawGuiContainerBackgr
if (s.getStack().isEmpty() || !s.getStack().hasDisplayName() || (s.getStack().getItem() != Items.MAP && s.getStack().getItem() != Items.PAPER)) continue;
if (!s.getStack().getDisplayName().startsWith(TextFormatting.WHITE + TextFormatting.BOLD.toString())) continue;
String displayName = StringUtils.stripControlCodes(s.getStack().getDisplayName()).toLowerCase(Locale.ROOT);
if (searchField.getText().isEmpty() || !displayName.contains(searchField.getText().toLowerCase(Locale.ROOT))) continue;
if (searchField == null || searchField.getText().isEmpty() || !displayName.contains(searchField.getText().toLowerCase(Locale.ROOT))) continue;

SpecialRendering.renderGodRays(e.getGui().getGuiLeft() + s.xPos + 5,
e.getGui().getGuiTop() + s.yPos + 6, 0, 5f, 35, UtilitiesConfig.INSTANCE.guildTerritoryMenuSearchHighlightColor);
Expand Down

0 comments on commit 84b3d20

Please sign in to comment.