Ask who listens for updates, fix underscore disguises not working

This commit is contained in:
libraryaddict 2017-06-25 00:20:19 +12:00
parent 2d28988cc4
commit d1a04e0f7d
2 changed files with 10 additions and 1 deletions

@ -174,6 +174,15 @@ public class LibsDisguises extends JavaPlugin {
} }
} }
}); });
final boolean updates = getConfig().getBoolean("NotifyUpdate");
metrics.addCustomChart(new Metrics.SimplePie("updates") {
@Override
public String getValue() {
return updates ? "Enabled" : "Disabled";
}
});
} }
@Override @Override

@ -185,7 +185,7 @@ public class DisguiseParser {
public static DisguisePerm getDisguisePerm(String name) { public static DisguisePerm getDisguisePerm(String name) {
for (DisguisePerm perm : getDisguisePerms()) { for (DisguisePerm perm : getDisguisePerms()) {
if (!perm.toReadable().equalsIgnoreCase(name) && !perm.toReadable().replace(" ", "").equalsIgnoreCase(name)) if (!perm.toReadable().replaceAll("[ |_]", "").equalsIgnoreCase(name.replaceAll("[ |_]", "")))
continue; continue;
return perm; return perm;