I'm having this error:
Type mismatch: cannot convert from element type Object to String
This is the code in error:
public List<String> customPrefixes(PermissionUser u)
{
List returnlist = new ArrayList();
for (String k : u.getAllPermissions().keySet()) {
List perms = (List)u.getAllPermissions().get(k);
for (String s : perms) {
String[] split = s.split(".");
if ((split.length >= 3) &&
(split[0].equalsIgnoreCase("plugin")) &&
(split[1].equalsIgnoreCase("prefix"))) {
returnlist.add(split[2]);
}
}
}
return returnlist;
}