Skip to content

Commit

Permalink
Restore dList.matches
Browse files Browse the repository at this point in the history
I guess it's vaguely more useful this way.
  • Loading branch information
mcmonkey4eva committed Nov 18, 2014
1 parent 3e47b8c commit 097bd95
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dList.java
Expand Up @@ -76,7 +76,24 @@ else if (string.indexOf('@') == 2) {


public static boolean matches(String arg) {
return true;

boolean flag = false;

if (arg.startsWith("fl")) {
if (arg.indexOf('[') == 2) {
int cb = arg.indexOf(']');
if (cb > 4 && arg.indexOf('@') == (cb + 1)) {
String owner = arg.substring(3, cb);
flag = arg.substring(cb + 2).length() > 0 && (dPlayer.matches(owner)
|| (Depends.citizens != null && dNPC.matches(owner)));
}
}
else if (arg.indexOf('@') == 2) {
flag = arg.substring(3).length() > 0;
}
}

return flag || arg.contains("|") || arg.contains(internal_escape) || arg.startsWith("li@");
}


Expand Down

0 comments on commit 097bd95

Please sign in to comment.