Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 7, 2015
1 parent f7b2ceb commit c62c1ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Expand Up @@ -47,7 +47,7 @@ public boolean couldMatch(ScriptContainer scriptContainer, String s) {
@Override
public boolean matches(ScriptContainer scriptContainer, String s) {
String lower = CoreUtilities.toLowerCase(s);
return entity.matchesEntity(CoreUtilities.getXthArg(0, CoreUtilities.toLowerCase(s)))
return entity.matchesEntity(CoreUtilities.getXthArg(0, s))
&& checkSwitch(lower, "cause", CoreUtilities.toLowerCase(cause.asString()));
}

Expand Down
6 changes: 2 additions & 4 deletions src/main/java/net/aufdemrand/denizen/objects/dLocation.java
Expand Up @@ -209,17 +209,15 @@ else if (split.length == 6)
return null;
}

final static Pattern location_by_saved = Pattern.compile("(l@)(.+)");

public static boolean matches(String string) {
if (string == null || string.length() == 0)
if (string == null || string.length() == 0) {
return false;
}

if (string.startsWith("l@")) {
return true;
}


return dLocation.valueOf(string, new BukkitTagContext(null, null, false, null, false, null)) != null;
}

Expand Down

0 comments on commit c62c1ff

Please sign in to comment.