Small fixes to context system

This commit is contained in:
Luck
2016-09-25 16:55:14 +01:00
Unverified
parent c53623dd67
commit 4da7fe4ff9
5 changed files with 14 additions and 12 deletions
@@ -177,8 +177,7 @@ public class CommandManager {
}
private void sendCommandUsage(Sender sender, String label) {
sender.sendMessage(Util.color("&6Running &bLuckPerms v" + plugin.getVersion() + "&6."));
Util.sendPluginMessage(sender, "&6Running &bLuckPerms v" + plugin.getVersion() + "&6.");
mainCommands.stream()
.filter(c -> c.isAuthorized(sender))
.forEach(c -> Util.sendPluginMessage(sender, "&e-> &d" + String.format(c.getUsage(), label)));
@@ -39,6 +39,6 @@ public class ServerCalculator<T> extends ContextCalculator<T> {
@Override
public boolean isContextApplicable(T subject, Map.Entry<String, String> context) {
return context.getKey().equals("server") && server.equals(context.getValue());
return context.getKey().equals("server") && server.equalsIgnoreCase(context.getValue());
}
}