Skip to content

Commit

Permalink
Minestom patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqzn committed Feb 14, 2025
1 parent c5e2ac8 commit 1d55b2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

allprojects {
group = "dev.velix"
version = "1.6.0"
version = "1.6.1"

ext {
def kyoriVersion = "4.17.0"
Expand Down
2 changes: 1 addition & 1 deletion minestom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ compileJava.targetCompatibility = '21'

dependencies {
compileOnly project(":core")
compileOnly 'net.minestom:minestom-snapshots:e8f34c317a'
compileOnly 'net.minestom:minestom-snapshots:620ebe5d6b'
}

java {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.velix.imperat;

import dev.velix.imperat.command.parameters.CommandParameter;
import net.minestom.server.command.ArgumentParserType;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.arguments.Argument;
import net.minestom.server.command.builder.exception.ArgumentSyntaxException;
Expand All @@ -24,10 +25,11 @@ final class ArgumentDecorator<T> extends Argument<T> {
}

@Override
public String parser() {
public ArgumentParserType parser() {
return argument.parser();
}


@Override
public boolean isOptional() {
return parameter.isOptional() && super.isOptional();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ private static Argument<?> from(String id, Type type) {
if (TypeUtility.matches(type, String.class))
return ArgumentType.String(id);

if (TypeUtility.matches(type, Integer.class)) {
return ArgumentType.Integer(id);
}

if (TypeUtility.matches(type, boolean.class))
return ArgumentType.Boolean(id);

Expand Down

0 comments on commit 1d55b2a

Please sign in to comment.