From b87b1923512c6ee92d95698544714116527255b7 Mon Sep 17 00:00:00 2001 From: jojo Date: Mon, 28 Dec 2020 23:18:41 +0100 Subject: [PATCH] Add Argument.BOOLEAN Add ArgumentType.BOOLEAN --- SpigotCore_Main/src/de/steamwar/command/Argument.java | 1 + SpigotCore_Main/src/de/steamwar/command/ArgumentType.java | 1 + 2 files changed, 2 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/command/Argument.java b/SpigotCore_Main/src/de/steamwar/command/Argument.java index e1aae74..15eb96e 100644 --- a/SpigotCore_Main/src/de/steamwar/command/Argument.java +++ b/SpigotCore_Main/src/de/steamwar/command/Argument.java @@ -30,6 +30,7 @@ import java.util.stream.Collectors; public class Argument { + public static final Argument BOOLEAN = new Argument<>(ArgumentType.BOOLEAN, bool -> true); public static final Argument INT = new Argument<>(ArgumentType.INT, integer -> true); public static final Argument LONG = new Argument<>(ArgumentType.LONG, l -> true); public static final Argument FLOAT = new Argument<>(ArgumentType.FLOAT, f -> true); diff --git a/SpigotCore_Main/src/de/steamwar/command/ArgumentType.java b/SpigotCore_Main/src/de/steamwar/command/ArgumentType.java index 80f5531..04df678 100644 --- a/SpigotCore_Main/src/de/steamwar/command/ArgumentType.java +++ b/SpigotCore_Main/src/de/steamwar/command/ArgumentType.java @@ -25,6 +25,7 @@ import java.util.function.Function; public class ArgumentType { + public static final ArgumentType BOOLEAN = new ArgumentType<>(Boolean::parseBoolean, false); public static final ArgumentType INT = new ArgumentType<>(Integer::parseInt, true); public static final ArgumentType LONG = new ArgumentType<>(Long::parseLong, true); public static final ArgumentType FLOAT = new ArgumentType<>(Float::parseFloat, true);