Add Velocity module
This commit is contained in:
parent
ccd0e8ae0e
commit
f1d4e7865d
17 changed files with 566 additions and 22 deletions
|
|
@ -447,10 +447,8 @@ public final class CommandTree<C> {
|
|||
chain = chain.subList(1, chain.size());
|
||||
// Go through all nodes from the tail upwards until a collision occurs
|
||||
for (final Node<CommandArgument<C, ?>> commandArgumentNode : chain) {
|
||||
if (commandArgumentNode.nodeMeta.containsKey("permission") && !commandArgumentNode.nodeMeta.get("permission")
|
||||
.equalsIgnoreCase(
|
||||
node.nodeMeta
|
||||
.get("permission"))) {
|
||||
if (commandArgumentNode.nodeMeta.containsKey("permission")
|
||||
&& !commandArgumentNode.nodeMeta.get("permission").equalsIgnoreCase(node.nodeMeta.get("permission"))) {
|
||||
commandArgumentNode.nodeMeta.put("permission", "");
|
||||
} else {
|
||||
commandArgumentNode.nodeMeta.put("permission", node.nodeMeta.get("permission"));
|
||||
|
|
|
|||
|
|
@ -148,9 +148,8 @@ public final class StandardParserRegistry<C> implements ParserRegistry<C> {
|
|||
if (producer == null) {
|
||||
/* Give enums special treatment */
|
||||
if (actualType.isSubtypeOf(Enum.class)) {
|
||||
@SuppressWarnings("all") final EnumArgument.EnumParser enumArgument = new EnumArgument.EnumParser((Class<Enum>)
|
||||
actualType
|
||||
.getRawType());
|
||||
@SuppressWarnings("all") final EnumArgument.EnumParser enumArgument
|
||||
= new EnumArgument.EnumParser((Class<Enum>) actualType.getRawType());
|
||||
// noinspection all
|
||||
return Optional.of(enumArgument);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue