From 1ad1f06e336a3ffeb5b45cd348b65086190a923b Mon Sep 17 00:00:00 2001 From: MrBretzel Date: Sat, 20 Feb 2021 15:31:30 +0100 Subject: [PATCH 1/2] Adding has(Argument argument) to Arguments.java --- .../java/net/minestom/server/command/builder/Arguments.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/minestom/server/command/builder/Arguments.java b/src/main/java/net/minestom/server/command/builder/Arguments.java index 3f7579246..ce373b08d 100644 --- a/src/main/java/net/minestom/server/command/builder/Arguments.java +++ b/src/main/java/net/minestom/server/command/builder/Arguments.java @@ -49,6 +49,10 @@ public final class Arguments { }); } + public boolean has(@NotNull Argument argument) { + return args.containsKey(argument.getId()); + } + public boolean has(@NotNull String identifier) { return args.containsKey(identifier); } From 2c45103b2cbc413ffe972e6c316071560b9558d7 Mon Sep 17 00:00:00 2001 From: MrBretzel Date: Sat, 20 Feb 2021 15:43:22 +0100 Subject: [PATCH 2/2] Update Arguments.java --- .../java/net/minestom/server/command/builder/Arguments.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/command/builder/Arguments.java b/src/main/java/net/minestom/server/command/builder/Arguments.java index ce373b08d..f34ecdac5 100644 --- a/src/main/java/net/minestom/server/command/builder/Arguments.java +++ b/src/main/java/net/minestom/server/command/builder/Arguments.java @@ -49,7 +49,7 @@ public final class Arguments { }); } - public boolean has(@NotNull Argument argument) { + public boolean has(@NotNull Argument argument) { return args.containsKey(argument.getId()); }