Skip to content

Commit

Permalink
Player Ranks GUI: Fixed an issue with the code not using the correct …
Browse files Browse the repository at this point in the history
…defaults for NoRankAccess when no value is provided in the configs.
  • Loading branch information
rbluer committed May 20, 2024
1 parent 9d8ff14 commit 86afca5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/changelog_v3.3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ These change logs represent the work that has been going on within prison.
# 3.3.0-alpha.17a 2024-05-20


* **Player Ranks GUI: Fixed an issue with the code not using the correct defaults for NoRankAccess when no value is provided in the configs.**


* **Obsolete blocks: Marked an enum as @Deprecated to suppress a compile warning.** This has not real impact on anything.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,11 @@ public void open() {
// Not sure how you want to represent this:
String materialHasStr = guiConfig.getString("Options.Ranks.MaterialType.HasRankAccess", "TRIPWIRE_HOOK");
XMaterial materialHas = XMaterial.matchXMaterial( materialHasStr ).orElse(null);
XMaterial materialHasNot = XMaterial.matchXMaterial(
guiConfig.getString("Options.Ranks.MaterialType.NoRankAccess")).orElse(null);

String materialHasNotStr = guiConfig.getString("Options.Ranks.MaterialType.NoRankAccess", "REDSTONE_BLOCK");
XMaterial materialHasNot = XMaterial.matchXMaterial(
materialHasNotStr != null ? materialHasNotStr : "REDSTONE_BLOCK"
).orElse(null);


List<String> configCustomLore = guiConfig.getStringList("EditableLore.Ranks");
Expand Down

0 comments on commit 86afca5

Please sign in to comment.