Few misc command fixes.

This commit is contained in:
wizjany
2019-06-01 07:41:19 -04:00
parent 9099a17fe5
commit 1e7c074217
7 changed files with 44 additions and 28 deletions

View File

@@ -80,10 +80,7 @@ class BukkitCommandInspector implements CommandInspector {
InjectedValueStore store = MapBackedValueStore.create();
store.injectValue(Key.of(Actor.class), context ->
Optional.of(plugin.wrapCommandSender(sender)));
CommandParameters parameters = NoInputCommandParameters.builder()
.injectedValues(MemoizingValueAccess.wrap(store))
.build();
return mapping.get().getCondition().satisfied(parameters);
return mapping.get().getCondition().satisfied(store);
} else {
logger.warn("BukkitCommandInspector doesn't know how about the command '" + command + "'");
return false;