Skip to content

Commit

Permalink
Fix dInventory NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 authored and mcmonkey4eva committed Aug 20, 2013
1 parent b8260a9 commit 7ec23fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/aufdemrand/denizen/Denizen.java
Expand Up @@ -138,7 +138,7 @@ public void onEnable() {
return;
} else startedSuccessful = true;

versionTag = getServer().getPluginManager().getPlugin("Denizen").getDescription().getVersion();
versionTag = this.getDescription().getVersion();

// Startup procedure
dB.echoDebug(DebugElement.Footer);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/aufdemrand/denizen/objects/dInventory.java
Expand Up @@ -166,7 +166,7 @@ public dInventory(Inventory inventory) {
if (holder instanceof DoubleChest)
holderIdentifier = ((DoubleChest) holder).getLocation().toString();
else if (holder instanceof BlockState)
holderIdentifier = getLocation().toString();
holderIdentifier = ((BlockState) holder).getLocation().toString();
holderType = "location";
}
else if (holder instanceof Player) {
Expand Down Expand Up @@ -228,7 +228,7 @@ public dInventory(InventoryHolder holder) {
if (holder instanceof DoubleChest)
holderIdentifier = ((DoubleChest) holder).getLocation().toString();
else if (holder instanceof BlockState)
holderIdentifier = getLocation().toString();
holderIdentifier = ((BlockState) holder).getLocation().toString();
holderType = "location";
}
else if (holder instanceof Player) {
Expand Down

0 comments on commit 7ec23fe

Please sign in to comment.