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

View File

@ -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

View File

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