Skip to content

Commit

Permalink
Fix NoIdentifier methods. Missed a thing or so.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyAMC committed Feb 21, 2015
1 parent 9c39e01 commit 3101a33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/main/java/net/aufdemrand/denizen/objects/dItem.java
Expand Up @@ -527,7 +527,12 @@ public String identifyMaterial() {
return dMaterial.getMaterialFrom(item.getType(), item.getData().getData()).identifySimple();
}

@Override

// Special-case that essentially fetches the material of the items and uses its 'identify()' method
public String identifyMaterialNoIdentifier() {
return dMaterial.getMaterialFrom(item.getType(), item.getData().getData()).identifySimpleNoIdentifier();
}

public String identifyNoIdentifier() {

if (item == null) return "null";
Expand All @@ -549,11 +554,9 @@ else if (isItemscript()) {
if (item.getDurability() >= 16 || item.getDurability() < 0) {
return getMaterial().realName() + "," + item.getDurability() + PropertyParser.getPropertiesString(this);
}
return getMaterial().identify() + PropertyParser.getPropertiesString(this);
return getMaterial().identifyNoIdentifier() + PropertyParser.getPropertiesString(this);
}


@Override
public String identifySimpleNoIdentifier() {
if (item == null) return "null";

Expand All @@ -571,7 +574,7 @@ else if (isItemscript()) {
}

// Else, return the material name
return identifyMaterial();
return identifyMaterialNoIdentifier();
}

public String getFullString() {
Expand Down
Expand Up @@ -710,7 +710,6 @@ public String identifyNoIdentifier() {
return material.name().toLowerCase();
}

@Override
public String identifySimpleNoIdentifier() {
if (forcedIdentity != null) return forcedIdentity.toLowerCase();
return material.name().toLowerCase();
Expand Down

0 comments on commit 3101a33

Please sign in to comment.