Skip to content

Commit

Permalink
Add feature requested in #477
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcernat committed Oct 19, 2013
1 parent 88f17fc commit fc36813
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/aufdemrand/denizen/objects/dInventory.java
Expand Up @@ -35,7 +35,7 @@ public class dInventory implements dObject, Notable {
// PATTERNS
/////////////////

final static Pattern inventory_by_type = Pattern.compile("(in@)(npc|player|entity|location|equipment)\\[(.+?)\\]", Pattern.CASE_INSENSITIVE);
final static Pattern inventory_by_type = Pattern.compile("(in@)(npc|player|entity|location|equipment|generic)\\[(.+?)\\]", Pattern.CASE_INSENSITIVE);
final static Pattern inventory_by_script = Pattern.compile("(in@)(.+)", Pattern.CASE_INSENSITIVE);

/////////////////////
Expand Down Expand Up @@ -97,7 +97,7 @@ public static dInventory valueOf(String string, dPlayer player, dNPC npc) {

if (type.equalsIgnoreCase("generic")) {
if (Argument.valueOf(holder).matchesEnum(InventoryType.values())) {
return new dInventory(InventoryType.valueOf(holder));
return new dInventory(InventoryType.valueOf(holder.toUpperCase()));
}
else {
dB.echoError("That type of inventory does not exist!");
Expand Down

0 comments on commit fc36813

Please sign in to comment.