Skip to content

Commit

Permalink
improve property output
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Feb 28, 2019
1 parent 243bec6 commit 07cc549
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -180,7 +180,7 @@ public String getAttribute(Attribute attribute) {
// Pre-escaped to prevent issues.
// See <@link language Property Escaping>
// -->
String output = getPropertyString();
String output = getOutputString();
if (output == null) {
output = "null";
}
Expand All @@ -193,6 +193,14 @@ public String getAttribute(Attribute attribute) {

@Override
public String getPropertyString() {
String output = getOutputString();
if (output.equals("raw_pages")) {
return null;
}
return output;
}

public String getOutputString() {
StringBuilder output = new StringBuilder();
BookMeta bookInfo = (BookMeta) item.getItemStack().getItemMeta();
if (item.getItemStack().getType().equals(Material.WRITTEN_BOOK)
Expand Down

0 comments on commit 07cc549

Please sign in to comment.