diff --git a/commandapi-annotations-reloaded-tests/pom.xml b/commandapi-annotations-reloaded-tests/pom.xml
new file mode 100644
index 0000000000..ccf37d6bfb
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/pom.xml
@@ -0,0 +1,139 @@
+
+
+
+ 4.0.0
+
+ dev.jorel
+ commandapi
+ 9.6.0-SNAPSHOT
+
+
+ commandapi-annotations-reloaded-tests
+
+
+ 16
+ 16
+ UTF-8
+
+
+
+
+ codemc-repo
+ https://repo.codemc.org/repository/maven-public/
+ default
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+
+
+ minecraft-libraries
+ https://libraries.minecraft.net
+
+
+
+
+
+
+
+ com.mojang
+ brigadier
+ 1.0.18
+ test
+
+
+ dev.jorel
+ commandapi-bukkit-plugin
+ ${project.version}
+ test
+
+
+
+
+ dev.jorel
+ commandapi-bukkit-core
+ ${project.version}
+
+
+ dev.jorel
+ commandapi-annotations-reloaded
+ ${project.version}
+ compile
+
+
+
+ com.google.auto.service
+ auto-service
+ ${auto-service.version}
+ provided
+
+
+ org.spigotmc
+ spigot-api
+ ${paper.version}
+ provided
+
+
+
+
+
+ com.google.testing.compile
+ compile-testing
+ 0.19
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter
+ 5.10.2
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+ testCompile
+
+
+
+ dev.jorel.commandapi.annotations.reloaded.Annotations
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0-M6
+
+
+
+
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandBossbar.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandBossbar.java
new file mode 100644
index 0000000000..b9918c6854
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandBossbar.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executes;
+import org.bukkit.Bukkit;
+import org.bukkit.ChatColor;
+import org.bukkit.NamespacedKey;
+import org.bukkit.boss.BarColor;
+import org.bukkit.boss.BarStyle;
+import org.bukkit.boss.BossBar;
+import org.bukkit.boss.KeyedBossBar;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.CommandAPI;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.ABooleanArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AChatComponentArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AEntitySelectorArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AIntegerArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AMultiLiteralArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.ANamespacedKeyArgument;
+import dev.jorel.commandapi.exceptions.WrapperCommandSyntaxException;
+import net.md_5.bungee.api.chat.BaseComponent;
+
+/**
+ * The annotated equivalent of BetterBossBars from the
+ * examples/bukkit/commandtrees directory
+ */
+@Command("betterbossbar")
+public class AnnotatedCommandBossbar {
+
+ // /betterbossbar set players
+ // /betterbossbar set style (notched_6|notched_10|notched_12|notched_20|progress)
+ // /betterbossbar set value
+ // /betterbossbar set visible
+
+ // /betterbossbar remove
+
+ // /betterbossbar get players
+ // /betterbossbar get visible
+ // /betterbossbar get max
+ // /betterbossbar get value
+
+ // /betterbossbar add
+
+ // /betterbossbar list
+
+ private Map maxValues;
+
+ public AnnotatedCommandBossbar() {
+ this.maxValues = new HashMap<>();
+ }
+
+ @Subcommand("set")
+ class SetSubcommand {
+
+ @ANamespacedKeyArgument
+ NamespacedKey id;
+
+ @Subcommand("players")
+ public void players(CommandSender sender,
+ @AEntitySelectorArgument.ManyPlayers Collection targets) {
+
+ Bukkit.getBossBar(id).removeAll();
+ for (Player player : targets) {
+ Bukkit.getBossBar(id).addPlayer(player);
+ }
+ }
+
+ @Subcommand("style")
+ public void style(CommandSender sender,
+ @AMultiLiteralArgument({ "notched_6", "notched_10", "notched_12", "notched_20", "progress" }) String style) throws WrapperCommandSyntaxException {
+
+ Bukkit.getBossBar(id).setStyle(
+ switch (style) {
+ case "notched_6" -> BarStyle.SEGMENTED_6;
+ case "notched_10" -> BarStyle.SEGMENTED_10;
+ case "notched_12" -> BarStyle.SEGMENTED_12;
+ case "notched_20" -> BarStyle.SEGMENTED_20;
+ case "progress" -> BarStyle.SOLID;
+ default -> throw CommandAPI.failWithString(style + " is an invalid bossbar style");
+ });
+ }
+
+ @Subcommand("value")
+ public void value(CommandSender sender,
+ @AIntegerArgument int value) {
+
+ if (maxValues.containsKey(id)) {
+ Bukkit.getBossBar(id).setProgress((double) value / (double) maxValues.get(id));
+ } else {
+ maxValues.put(id, value);
+ Bukkit.getBossBar(id).setProgress(1.0D);
+ }
+ }
+
+ @Subcommand("visible")
+ public void visible(CommandSender sender,
+ @ABooleanArgument boolean visible) {
+
+ Bukkit.getBossBar(id).setVisible(visible);
+ }
+
+ }
+
+ @Subcommand("remove")
+ public void remove(CommandSender sender,
+ @ANamespacedKeyArgument NamespacedKey id) {
+
+ sender.sendMessage("Removed custom bossbar [" + Bukkit.getBossBar(id).getTitle() + "]");
+ Bukkit.getBossBar(id).removeAll();
+ Bukkit.removeBossBar(id);
+ }
+
+ @Subcommand("get")
+ class GetSubcommand {
+
+ @ANamespacedKeyArgument
+ NamespacedKey id;
+
+ @Subcommand("players")
+ public void players(CommandSender sender) {
+ List bossBarPlayers = Bukkit.getBossBar(id).getPlayers();
+ String players = bossBarPlayers.stream().map(Player::getName).collect(Collectors.joining(", "));
+ sender.sendMessage("Custom bossbar [" + Bukkit.getBossBar(id).getTitle() + "] has " + bossBarPlayers.size() + " players currently online: " + players);
+ }
+
+ @Subcommand("visible")
+ public void visible(CommandSender sender) {
+ BossBar bossBar = Bukkit.getBossBar(id);
+ sender.sendMessage("Custom bossbar [" + bossBar.getTitle() + "] is currently " + (bossBar.isVisible() ? "shown" : "hidden"));
+ }
+
+ @Subcommand("max")
+ public void max(CommandSender sender) {
+ sender.sendMessage("Custom bossbar [" + Bukkit.getBossBar(id).getTitle() + "] has a maximum of " + maxValues.getOrDefault(id, 100));
+ }
+
+ @Subcommand("value")
+ public void value(CommandSender sender) {
+ BossBar bossBar = Bukkit.getBossBar(id);
+
+ int value = (int) (bossBar.getProgress() * maxValues.getOrDefault(id, 100));
+ sender.sendMessage("Custom bossbar [" + Bukkit.getBossBar(id).getTitle() + "] has a value of " + value);
+ }
+ }
+
+ @Subcommand("add")
+ class AddSubcommand {
+
+ @Executes
+ public void addBossbar(CommandSender sender,
+ @ANamespacedKeyArgument NamespacedKey id,
+ @AChatComponentArgument BaseComponent[] name) {
+
+ Bukkit.createBossBar(id, BaseComponent.toLegacyText(name), BarColor.WHITE, BarStyle.SOLID);
+ maxValues.put(id, 100);
+ sender.sendMessage("Created custom bossbar [" + BaseComponent.toLegacyText(name) + ChatColor.WHITE + "]");
+ }
+
+ }
+
+ @Subcommand("list")
+ public void ListSubcommand(CommandSender sender) {
+ Iterable bossBars = Bukkit::getBossBars;
+ sender.sendMessage("List of custom bossbars: " +
+ StreamSupport
+ .stream(bossBars.spliterator(), false)
+ .map(KeyedBossBar::getKey)
+ .map(NamespacedKey::toString)
+ .collect(Collectors.joining(", "))
+ );
+ }
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandRepeatingSubcommands.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandRepeatingSubcommands.java
new file mode 100644
index 0000000000..ac6673cfe8
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandRepeatingSubcommands.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+
+/**
+ * A test for repeating subcommand annotations
+ */
+@Command("perm")
+public class AnnotatedCommandRepeatingSubcommands {
+
+ // /perm set user
+
+// @Subcommand("set")
+// @Subcommand("user")
+// public void execute(CommandSender sender,
+// @APlayerArgument Player player,
+// @AStringArgument String permission) {
+// // Do stuff
+// }
+
+// class SetUserSubcommand {
+//
+// @APlayerArgument
+// Player player;
+//
+// @AStringArgument
+// String permission;
+//
+// @Subcommand
+// public void execute(CommandSender sender) {
+// // Do stuff
+// }
+// }
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandWithExternalSubcommand.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandWithExternalSubcommand.java
new file mode 100644
index 0000000000..ae50258db1
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandWithExternalSubcommand.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.ExternalSubcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+
+/**
+ * Annotated command that uses an external subcommand
+ */
+@Command("mycommand")
+public class AnnotatedCommandWithExternalSubcommand {
+
+ // /mycommand
+
+ @AStringArgument
+ String name;
+
+ @ExternalSubcommand(AnnotatedExternalSubcommand.class)
+ AnnotatedExternalSubcommand subcommand;
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandWithSuggestions.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandWithSuggestions.java
new file mode 100644
index 0000000000..9d1d709b84
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedCommandWithSuggestions.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import java.util.function.Supplier;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executes;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Suggestion;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Suggests;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+import dev.jorel.commandapi.arguments.ArgumentSuggestions;
+
+/**
+ * Annotated command that uses suggestion classes
+ */
+@Command("mycommand")
+public class AnnotatedCommandWithSuggestions {
+
+ // /mycommand
+
+ @AStringArgument
+ @Suggests(ListOfNames.class)
+ String name;
+
+ @Executes
+ public void myExecutor(Player player) {
+ // ...
+ }
+
+ @Suggestion
+ class ListOfNames implements Supplier> {
+
+ @Override
+ public ArgumentSuggestions get() {
+ return ArgumentSuggestions.strings("Player1", "Player2", "Player3");
+ }
+
+ }
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedExternalSubcommand.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedExternalSubcommand.java
new file mode 100644
index 0000000000..f380877f6a
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotatedExternalSubcommand.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executes;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AIntegerArgument;
+
+/**
+ * Annotated subcommand. Note that this class uses {@code @Subcommand} instead
+ * of {@code @Command}
+ */
+@Subcommand("subcommand")
+public class AnnotatedExternalSubcommand extends AnnotatedCommandWithExternalSubcommand {
+
+ // mycommand
+
+ @Executes
+ public void myMethod(Player player, @AIntegerArgument int value) {
+ String nameArg = name; // Inherited from parent command class
+ }
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/HordeCommand2.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/HordeCommand2.java
new file mode 100644
index 0000000000..e41ebfc700
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/HordeCommand2.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import java.util.function.Supplier;
+
+import org.bukkit.Location;
+import org.bukkit.World;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.ArgumentParser;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Suggestion;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Suggests;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AIntegerArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+import dev.jorel.commandapi.arguments.ArgumentSuggestions;
+import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException;
+import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfo;
+import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfoParser;
+import dev.jorel.commandapi.arguments.SafeSuggestions;
+
+@Command("horde")
+public class HordeCommand2 {
+
+ final int val;
+
+ // Some constructor
+ public HordeCommand2(int val) {
+ this.val = val;
+ }
+
+ @AStringArgument
+ String hiiiiii;
+
+ @AIntegerArgument
+ int byeeeeee;
+
+ @Subcommand("hazard")
+ class HazardCommand {
+
+ @Subcommand("create")
+ class CreateCommand {
+
+ @Subcommand("fire")
+ public void fire(CommandSender executor, @AStringArgument String name) {
+ }
+ }
+
+ @Subcommand("modify")
+ class ModifyCommand {
+
+ @Permission("hello")
+ @Suggests(HazardSuggestions.class)
+ @AStringArgument
+ String name;
+
+ // horde hazard modify area
+ @Subcommand("area")
+ public void area(Player player, @AIntegerArgument int size) {
+ }
+
+ // horde hazard modify area
+ @Permission("hoard.hazard.modify.area")
+ @Subcommand("area")
+ public void area(CommandSender sender, @AIntegerArgument int size) {
+ }
+
+ // TODO: This should fail because String is not an
+// @Subcommand("area")
+// public void area2(CommandSender sender, @AIntegerArgument String size) {
+// }
+
+ @Suggestion
+ class HazardSuggestions implements Supplier {
+
+ @Override
+ public ArgumentSuggestions get() {
+ return ArgumentSuggestions.strings("fire", "water", "poison");
+ }
+
+ }
+
+ @Suggestion
+ class LocationSuggestions implements Supplier> {
+
+ @Override
+ public SafeSuggestions get() {
+ return SafeSuggestions.suggest(new Location[0]);
+ }
+
+ }
+ }
+
+ @Subcommand("toggle")
+ public void toggle(CommandSender sender) {
+ }
+ }
+
+
+
+ @Suggestion
+ class EnableSuggestions implements Supplier {
+
+ @Override
+ public ArgumentSuggestions get() {
+ return ArgumentSuggestions.strings("fire", "water", "poison");
+ }
+
+ }
+
+ @Suggestion
+ class LocationSuggestions implements Supplier> {
+
+ @Override
+ public SafeSuggestions get() {
+ return SafeSuggestions.suggest(new Location[0]);
+ }
+
+ }
+
+ @Subcommand("enable")
+ public void enable(Player sender) {
+ }
+
+ @Subcommand("disable")
+ public void disable(CommandSender sender) {
+ }
+
+ // TODO: When testing, try moving this to its own separate .java file and see if that links properly
+ @ArgumentParser
+ class WorldArgument implements CustomArgumentInfoParser {
+
+ @Override
+ public World apply(CustomArgumentInfo info) throws CustomArgumentException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+ // TODO: For both custom arguments and suggestions, we should have a check to see if there are
+ // any unused @ArgumentParser or @Suggestion classes
+// @Subcommand("custom")
+// public void custom(CommandSender sender, @ACustomArgument(WorldArgument.class) World world) {
+//
+// }
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/MyCommand.java b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/MyCommand.java
new file mode 100644
index 0000000000..73357d1cb8
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/main/java/dev/jorel/commandapi/annotations/reloaded/test/MyCommand.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executes;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.APlayerArgument;
+
+// mycommand hi - says hi to everyone
+// mycommand nested - says hi to a player
+// mycommand nested hello - says hello to everyone
+
+@Command("mycommand")
+public class MyCommand {
+
+ @Subcommand("hi")
+ public class Hi {
+
+ @Executes
+ public void hi(CommandSender sender) {
+ System.out.println("Hi");
+ }
+
+ }
+
+ // TODO: This should be a valid case which does the same thing as the thing
+ // above it
+// @Subcommand("hi")
+// public void hi(CommandSender sender) {
+// System.out.println("Hi");
+// }
+
+ @Subcommand("nested")
+ public class Nested {
+
+ @Executes
+ public void toPlayer(CommandSender sender, @APlayerArgument Player player) {
+ System.out.println("Hi " + player.getName());
+ }
+
+ @Subcommand("hello")
+ public class Hello {
+
+ @Executes
+ public void hello(CommandSender sender) {
+ System.out.println("Hello");
+ }
+
+ }
+
+ }
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/TestConfiguration.java b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/TestConfiguration.java
new file mode 100644
index 0000000000..cda2a57551
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/TestConfiguration.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import javax.annotation.Nonnull;
+import java.util.UUID;
+
+public class TestConfiguration extends DefaultConfiguration {
+ @Nonnull
+ @Override
+ public String getCommandsClassName() {
+ return "Commands_Test_%s".formatted(UUID.randomUUID().toString().replace("-", "_"));
+ }
+}
diff --git a/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotationTests.java b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotationTests.java
new file mode 100644
index 0000000000..ba18cc4c7c
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/AnnotationTests.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.test;
+
+import com.google.testing.compile.Compilation;
+import dev.jorel.commandapi.annotations.reloaded.Annotations;
+import dev.jorel.commandapi.annotations.reloaded.TestConfiguration;
+import org.junit.jupiter.api.Test;
+
+import static com.google.testing.compile.CompilationSubject.assertThat;
+import static com.google.testing.compile.Compiler.javac;
+import static com.google.testing.compile.JavaFileObjects.forResource;
+import static com.google.testing.compile.JavaFileObjects.forSourceString;
+
+public class AnnotationTests {
+
+ Compilation compile(String classToCompile) {
+ return javac().withProcessors(new Annotations(new TestConfiguration())).compile(forResource(classToCompile));
+ }
+
+ /**
+ * Testing that the testing framework works
+ */
+ @Test
+ void googleCompileTestingInit() {
+ Compilation compilation = javac().compile(forSourceString("HelloWorld", "public class HelloWorld {}"));
+ assertThat(compilation).succeeded();
+ }
+
+ @Test
+ void googleCompileTestingInitFail() {
+ Compilation compilation = javac().compile(forSourceString("HelloWorld", "public class HelloWorld {} blah"));
+ assertThat(compilation).failed();
+ }
+
+ @Test
+ void hordeTest() {
+// Compilation compilation = javac()
+// .withProcessors(new Annotations())
+// .compile(forResource("HordeCommand.java"));
+// assertThat(compilation).succeeded();
+ }
+
+ /**
+ * Testing that a {@code @Command} on a type inside another type with {@code @Command} fails to compile
+ */
+ @Test
+ void noNestedCommands() {
+ assertThat(compile("NestedCommand.java"))
+ .hadErrorContaining("@Command can only go on a top level class")
+ .inFile(forResource("NestedCommand.java"))
+ .onLine(27);
+ }
+
+ /**
+ * Testing that a {@code @Command} class has at least one executor
+ */
+ @Test
+ void checkCommandHasExecutor() {
+ assertThat(compile("ClassWithNoExecutor.java"))
+ .hadWarningContaining("@Command class has no executors")
+ .inFile(forResource("ClassWithNoExecutor.java"))
+ .onLine(24);
+ }
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/PermissionTests.java b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/PermissionTests.java
new file mode 100644
index 0000000000..1978900162
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/PermissionTests.java
@@ -0,0 +1,73 @@
+package dev.jorel.commandapi.annotations.reloaded.test; /*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import com.google.testing.compile.Compilation;
+import dev.jorel.commandapi.annotations.reloaded.Annotations;
+import dev.jorel.commandapi.annotations.reloaded.TestConfiguration;
+import org.junit.jupiter.api.Test;
+
+import static com.google.testing.compile.CompilationSubject.assertThat;
+import static com.google.testing.compile.Compiler.javac;
+import static com.google.testing.compile.JavaFileObjects.forResource;
+import static com.google.testing.compile.JavaFileObjects.forSourceString;
+
+public class PermissionTests {
+
+ Compilation compile(String classToCompile) {
+ return javac().withProcessors(new Annotations(new TestConfiguration())).compile(forResource(classToCompile));
+ }
+
+ /*
+ * Testing that the testing framework works
+ */
+
+ @Test
+ void googleCompileTestingInit() {
+ Compilation compilation = javac().compile(forSourceString("HelloWorld", "public class HelloWorld {}"));
+ assertThat(compilation).succeeded();
+ }
+
+ @Test
+ void googleCompileTestingInitFail() {
+ Compilation compilation = javac().compile(forSourceString("HelloWorld", "public class HelloWorld {} blah"));
+ assertThat(compilation).failed();
+ }
+
+ @Test
+ void hordeTest() {
+// Compilation compilation = javac()
+// .withProcessors(new Annotations())
+// .compile(forResource("HordeCommand.java"));
+// assertThat(compilation).succeeded();
+ }
+
+ @Test
+ /**
+ * Testing that a {@code @Command} on a type inside another type with {@code @Command} fails to compile
+ */
+ void noNestedCommands() {
+ assertThat(compile("NestedCommand.java"))
+ .hadErrorContaining("@Command can only go on a top level class")
+ .inFile(forResource("NestedCommand.java"))
+ .onLine(27);
+ }
+
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/RegisteringTest.java b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/RegisteringTest.java
new file mode 100644
index 0000000000..3031b33bdb
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/java/dev/jorel/commandapi/annotations/reloaded/test/RegisteringTest.java
@@ -0,0 +1,56 @@
+package dev.jorel.commandapi.annotations.reloaded.test; /*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import dev.jorel.commandapi.annotations.reloaded.test.HordeCommand2;
+import org.junit.jupiter.api.Test;
+
+public class RegisteringTest {
+
+ /**
+ * Registers a command. Used with the CommandAPI's Annotation API.
+ * @param commandClass the class to register
+ * @param instance the instance of the class to use
+ */
+ public static void registerCommand(Class commandClass, T instance) {
+ try {
+ final Class> commandsClass = Class.forName("Commands");
+ final Object commandsClassInstance = commandsClass.getDeclaredConstructor().newInstance();
+ commandsClass.getDeclaredMethod("register", commandClass).invoke(commandsClassInstance, instance);
+ } catch (ReflectiveOperationException e) {
+ boolean shouldPrint = true;
+ if (e.getCause() instanceof IllegalStateException illegalStateException) {
+ if (illegalStateException.getMessage().contains("Tried to access CommandAPIHandler instance")) {
+ // Shh shh shh, there there...
+ shouldPrint = false;
+ }
+ }
+
+ if (shouldPrint) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ @Test
+ public void register() {
+ registerCommand(HordeCommand2.class, new HordeCommand2(123));
+ }
+
+}
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/ClassWithNoExecutor.java b/commandapi-annotations-reloaded-tests/src/test/resources/ClassWithNoExecutor.java
new file mode 100644
index 0000000000..89de98ba54
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/ClassWithNoExecutor.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+
+@Command("run")
+public class ClassWithNoExecutor {
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/DocumentationWarpCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/DocumentationWarpCommand.java
new file mode 100644
index 0000000000..0518698e6d
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/DocumentationWarpCommand.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import java.util.HashMap;
+import java.util.Map;
+
+import org.bukkit.Location;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.java.JavaPlugin;
+
+import dev.jorel.commandapi.CommandAPI;
+import dev.jorel.commandapi.CommandAPICommand;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+import dev.jorel.commandapi.arguments.ArgumentSuggestions;
+import dev.jorel.commandapi.arguments.StringArgument;
+
+/* ANCHOR: warps */
+/* ANCHOR: warps_command */
+@Command("warp")
+public class DocumentationWarpCommand {
+/* ANCHOR_END: warps_command */
+
+ // List of warp names and their locations
+ static Map warps = new HashMap<>();
+
+ @Subcommand
+ public static void warp(CommandSender sender) {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+ }
+
+ @Subcommand
+ public static void warp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+ @Subcommand("create")
+ @Permission("warps.create")
+ public static void createWarp(Player player, @AStringArgument String warpName) {
+ warps.put(warpName, player.getLocation());
+ }
+
+}
+/* ANCHOR_END: warps */
+
+class A {
+ {
+/* ANCHOR: warps_register */
+CommandAPI.registerCommand(DocumentationWarpCommand.class);
+/* ANCHOR_END: warps_register */
+ }
+
+ static Map warps = new HashMap<>();
+
+/* ANCHOR: warps_help */
+@Subcommand
+public static void warp(CommandSender sender) {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+}
+/* ANCHOR_END: warps_help */
+
+/* ANCHOR: warps_warp */
+@Subcommand
+public static void warp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+}
+/* ANCHOR_END: warps_warp */
+
+/* ANCHOR: warps_create */
+@Subcommand("create")
+@Permission("warps.create")
+public static void createWarp(Player player, @AStringArgument String warpName) {
+ warps.put(warpName, player.getLocation());
+}
+/* ANCHOR_END: warps_create */
+
+}
+
+class Examples {
+{
+/* ANCHOR: old_warps */
+Map warps = new HashMap<>();
+
+// /warp
+new CommandAPICommand("warp")
+ .executes((sender, args) -> {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+ })
+ .register();
+
+// /warp
+new CommandAPICommand("warp")
+ .withArguments(new StringArgument("warp").replaceSuggestions(ArgumentSuggestions.strings(info ->
+ warps.keySet().toArray(new String[0])
+ )))
+ .executesPlayer((player, args) -> {
+ player.teleport(warps.get((String) args[0]));
+ })
+ .register();
+
+// /warp create
+new CommandAPICommand("warp")
+ .withSubcommand(
+ new CommandAPICommand("create")
+ .withPermission("warps.create")
+ .withArguments(new StringArgument("warpname"))
+ .executesPlayer((player, args) -> {
+ warps.put((String) args[0], player.getLocation());
+ })
+ )
+ .register();
+/* ANCHOR_END: old_warps */
+}
+
+/* ANCHOR: warp_register2 */
+class MyPlugin extends JavaPlugin {
+
+ @Override
+ public void onLoad() {
+ CommandAPI.registerCommand(DocumentationWarpCommand.class);
+ }
+
+}
+/* ANCHOR_END: warp_register2 */
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/FlattenedCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/FlattenedCommand.java
new file mode 100644
index 0000000000..2435995b7e
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/FlattenedCommand.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import java.util.HashMap;
+import java.util.Map;
+
+import org.bukkit.Location;
+import org.bukkit.OfflinePlayer;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executors;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Help;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.APlayerArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+import dev.jorel.commandapi.executors.ExecutorType;
+
+@Command("warp")
+@Help(value = "Manages all warps on the server", shortDescription = "Manages warps")
+public class FlattenedCommand {
+
+ // List of warp names and their locations
+ final Map warps;
+
+ public FlattenedCommand() {
+ warps = new HashMap<>();
+ }
+
+ // /warp
+ @Subcommand
+ public void warp(CommandSender sender) {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+ sender.sendMessage("/warp tp - Teleports a player to a warp");
+ }
+
+ // /warp
+ @Subcommand
+ public void warp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+ // /warp create
+ @Subcommand("create")
+ @Permission("warps.create")
+ @Executors({ExecutorType.ENTITY, ExecutorType.PLAYER})
+ public void createWarp(CommandSender sender, @AStringArgument String warpName) {
+ warps.put(warpName, ((LivingEntity) sender).getLocation());
+ }
+
+ // /warp tp
+ @Subcommand("tp")
+ @Permission("warps.tp")
+ public void tpWarp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+ // /warp tp
+ @Subcommand("tp")
+ @Permission("warps.tp.other")
+ public void tpWarp(CommandSender sender, @APlayerArgument OfflinePlayer target, @AStringArgument String warpName) {
+ if(target.isOnline() && target instanceof Player onlineTarget) {
+ onlineTarget.teleport(warps.get(warpName));
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/HordeCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/HordeCommand.java
new file mode 100644
index 0000000000..7bc1e4a1b3
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/HordeCommand.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+
+@Command("horde")
+public class HordeCommand {
+
+ @Subcommand("hazard")
+ class HazardCommand {
+
+ @Subcommand("create")
+ class CreateCommand {
+
+ @Subcommand("fire")
+ public void fire(CommandSender executor, String name) {
+ }
+ }
+
+ @Subcommand("modify")
+ class ModifyCommand {
+
+ @AStringArgument
+ String name;
+
+ // horde hazard modify area
+ @Subcommand("area")
+ public void area(Player player, int size) {
+ }
+
+ // horde hazard modify area
+ @Subcommand("area")
+ public void area(CommandSender sender, int size) {
+ }
+ }
+
+ @Subcommand("toggle")
+ public void toggle() {
+ }
+ }
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/InvalidCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/InvalidCommand.java
new file mode 100644
index 0000000000..f75f7eed5c
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/InvalidCommand.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import java.util.HashMap;
+import java.util.Map;
+
+import org.bukkit.Location;
+import org.bukkit.OfflinePlayer;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Help;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.APlayerArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+import dev.jorel.commandapi.arguments.SafeSuggestions;
+
+@Command("warp")
+@Help(value = "Manages all warps on the server", shortDescription = "Manages warps")
+public class InvalidCommand {
+
+ // List of warp names and their locations
+ final Map warps;
+
+ public InvalidCommand() {
+ warps = new HashMap<>();
+ }
+
+ // /warp
+ @Subcommand
+ public void warp(CommandSender sender) {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+ sender.sendMessage("/warp tp - Teleports a player to a warp");
+ }
+
+ // /warp
+ @Subcommand
+ public void warp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+// @Suggestion
+// public ArgumentSuggestions aaaaa() {
+// return ArgumentSuggestions.strings("hi", "bye");
+// }
+
+ public SafeSuggestions aaaaaaaaaaa() {
+ return SafeSuggestions.suggest(new Location(null, 1, 2, 3));
+ }
+
+// @Subcommand("create")
+// @Permission("warps.create")
+// @Executors({ExecutorType.ENTITY, ExecutorType.PLAYER})
+// public void createWarp(
+// CommandSender sender,
+// @Suggests("aaaaa") @AStringArgument String warpName
+// ) throws WrapperCommandSyntaxException {
+//
+// warps.put(warpName, ((LivingEntity) sender).getLocation());
+// throw CommandAPI.fail("");
+//
+// }
+
+ @Subcommand("create")
+ @Permission("warps.create")
+ public void tpWarp(CommandSender sender, @APlayerArgument OfflinePlayer target, @AStringArgument String warpName) {
+ if(target.isOnline() && target instanceof Player onlineTarget) {
+ onlineTarget.teleport(warps.get(warpName));
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/NestedCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/NestedCommand.java
new file mode 100644
index 0000000000..e5c45b8ad3
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/NestedCommand.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+
+@Command("outer")
+public class NestedCommand {
+
+ @Command("inner")
+ class InnerCommand {
+ }
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/TestCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/TestCommand.java
new file mode 100644
index 0000000000..fa6a6b69ad
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/TestCommand.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import java.util.HashMap;
+import java.util.Map;
+
+import org.bukkit.Location;
+import org.bukkit.OfflinePlayer;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Help;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.APlayerArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+
+@Command("warp")
+@Help(value = "Manages all warps on the server", shortDescription = "Manages warps")
+public class TestCommand {
+
+ // List of warp names and their locations
+ static Map warps = new HashMap<>();
+
+ @Subcommand
+ public static void warp(CommandSender sender) {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+ sender.sendMessage("/warp tp - Teleports a player to a warp");
+ }
+
+ @Subcommand
+ public static void warp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+ @Subcommand("create")
+ @Permission("warps.create")
+ public static void createWarp(Player player, @AStringArgument String warpName) {
+ warps.put(warpName, player.getLocation());
+ }
+
+ @Subcommand("create")
+ @Permission("warps.create")
+ public static void tpWarp(CommandSender sender, @APlayerArgument OfflinePlayer target, @AStringArgument String warpName) {
+ if(target.isOnline() && target instanceof Player onlineTarget) {
+ onlineTarget.teleport(warps.get(warpName));
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded-tests/src/test/resources/ValidCommand.java b/commandapi-annotations-reloaded-tests/src/test/resources/ValidCommand.java
new file mode 100644
index 0000000000..688a10a787
--- /dev/null
+++ b/commandapi-annotations-reloaded-tests/src/test/resources/ValidCommand.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+import java.util.HashMap;
+import java.util.Map;
+
+import org.bukkit.Location;
+import org.bukkit.OfflinePlayer;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Player;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executors;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Help;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.arguments.APlayerArgument;
+import dev.jorel.commandapi.annotations.reloaded.arguments.AStringArgument;
+import dev.jorel.commandapi.executors.ExecutorType;
+
+@Command("warp")
+@Help(value = "Manages all warps on the server", shortDescription = "Manages warps")
+public class ValidCommand {
+
+ // List of warp names and their locations
+ final Map warps;
+
+ public ValidCommand() {
+ warps = new HashMap<>();
+ }
+
+ // /warp
+ @Subcommand
+ public void warp(CommandSender sender) {
+ sender.sendMessage("--- Warp help ---");
+ sender.sendMessage("/warp - Show this help");
+ sender.sendMessage("/warp - Teleport to ");
+ sender.sendMessage("/warp create - Creates a warp at your current location");
+ sender.sendMessage("/warp tp - Teleports a player to a warp");
+ }
+
+ // /warp
+ @Subcommand
+ public void warp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+ @Subcommand("create")
+ class WarpCreate {
+
+ // /warp create
+ @Subcommand
+ @Permission("warps.create")
+ @Executors({ExecutorType.ENTITY, ExecutorType.PLAYER})
+ public void createWarp(CommandSender sender, @AStringArgument String warpName) {
+ warps.put(warpName, ((LivingEntity) sender).getLocation());
+ }
+
+ }
+
+ @Subcommand("tp")
+ class WarpTp {
+
+ // /warp tp
+ @Subcommand
+ @Permission("warps.tp")
+ public void tpWarp(Player player, @AStringArgument String warpName) {
+ player.teleport(warps.get(warpName));
+ }
+
+ // /warp tp
+ @Subcommand
+ @Permission("warps.tp.other")
+ public void tpWarp(CommandSender sender, @APlayerArgument OfflinePlayer target, @AStringArgument String warpName) {
+ if(target.isOnline() && target instanceof Player onlineTarget) {
+ onlineTarget.teleport(warps.get(warpName));
+ }
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded/.gitignore b/commandapi-annotations-reloaded/.gitignore
new file mode 100644
index 0000000000..c71ea97aba
--- /dev/null
+++ b/commandapi-annotations-reloaded/.gitignore
@@ -0,0 +1 @@
+/.apt_generated/
diff --git a/commandapi-annotations-reloaded/pom.xml b/commandapi-annotations-reloaded/pom.xml
new file mode 100644
index 0000000000..ba54ffefeb
--- /dev/null
+++ b/commandapi-annotations-reloaded/pom.xml
@@ -0,0 +1,136 @@
+
+
+ 4.0.0
+
+ dev.jorel
+ commandapi
+ 9.6.0-SNAPSHOT
+
+
+ commandapi-annotations-reloaded
+
+
+
+ codemc-repo
+ https://repo.codemc.org/repository/maven-public/
+ default
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+
+
+ minecraft-libraries
+ https://libraries.minecraft.net
+
+
+
+
+
+
+
+ com.mojang
+ brigadier
+ 1.0.18
+ test
+
+
+ dev.jorel
+ commandapi-bukkit-plugin
+ ${project.version}
+ test
+
+
+
+
+ dev.jorel
+ commandapi-bukkit-core
+ ${project.version}
+
+
+ com.google.auto.service
+ auto-service
+ ${auto-service.version}
+ provided
+
+
+ org.spigotmc
+ spigot-api
+ ${paper.version}
+ provided
+
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ 5.10.2
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.10.2
+ test
+
+
+ org.mockito
+ mockito-core
+ 5.11.0
+ test
+
+
+ org.mockito
+ mockito-junit-jupiter
+ 5.11.0
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+ testCompile
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0-M6
+
+
+
+
+
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/AnnotationUtils.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/AnnotationUtils.java
new file mode 100644
index 0000000000..5e28c90fce
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/AnnotationUtils.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.NestingKind;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+public class AnnotationUtils {
+
+ /**
+ * Get the AnnotationMirror for a specific annotation on an element
+ */
+ public Optional extends AnnotationMirror> getAnnotationMirror(Element element, Class extends Annotation> annotationClass) {
+ String className = annotationClass.getCanonicalName();
+ return element.getAnnotationMirrors().stream()
+ .filter(mirror -> mirror.getAnnotationType().toString().equals(className))
+ .findFirst();
+ }
+
+ /**
+ * Get the TypeMirror from an annotation
+ */
+ public Optional extends AnnotationValue> getAnnotationValue(Element element, Class extends Annotation> annotationClass) {
+ return getAnnotationMirror(element, annotationClass)
+ .flatMap(annotationMirror -> annotationMirror.getElementValues().entrySet().stream()
+ .filter(entry -> entry.getKey().getSimpleName().toString().equals("value"))
+ .map(Map.Entry::getValue)
+ .findFirst());
+ }
+
+ /**
+ * Get the TypeMirror from an annotation which has a value of type {@code Class<>}
+ */
+ public Optional getAnnotationClassValue(Element element, Class extends Annotation> annotationClass) {
+ return getAnnotationValue(element, annotationClass)
+ .map(AnnotationValue::getValue)
+ .map(TypeMirror.class::cast);
+ }
+
+ /**
+ * @return True, if the element contains the given annotation
+ */
+ public boolean hasAnnotation(Element element, Class extends Annotation> annotationClass) {
+ return element.getAnnotation(annotationClass) != null;
+ }
+
+ /**
+ * @return True, if the element contains any of the given annotations
+ */
+ @SafeVarargs
+ public final boolean hasAnyAnnotation(Element element, Class extends Annotation>... annotationClasses) {
+ for (Class extends Annotation> annotationClass : annotationClasses) {
+ if (hasAnnotation(element, annotationClass)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @return True, if the element contains none of the given annotations
+ */
+ @SafeVarargs
+ public final boolean doesNotHaveAnnotations(Element element, Class extends Annotation>... annotationClasses) {
+ return !hasAnyAnnotation(element, annotationClasses);
+ }
+
+ /**
+ * @param element The element to find enclosed elements within
+ * @param annotationClass The annotation to look for in enclosed elements
+ * @return A list of all enclosed elements with the given annotation
+ */
+ public List extends Element> getEnclosedElementsWithAnnotation(Element element, Class extends Annotation> annotationClass) {
+ return element.getEnclosedElements().stream()
+ .filter(enclosed -> hasAnnotation(enclosed, annotationClass))
+ .toList();
+ }
+
+ /**
+ * @param element The element to find enclosed methods within
+ * @param annotationClass The annotation to look for in enclosed methods
+ * @return A list of all enclosed methods with the given annotation
+ */
+ public List getEnclosedMethodsWithAnnotation(Element element, Class extends Annotation> annotationClass) {
+ return getEnclosedElementsWithAnnotation(element, annotationClass).stream()
+ .filter(enclosed -> enclosed.getKind() == ElementKind.METHOD)
+ .map(ExecutableElement.class::cast)
+ .toList();
+ }
+
+ /**
+ * @param element The element to find the top-level class of
+ * @return The top-level class of this element
+ */
+ public TypeElement getTopLevelClass(Element element) {
+ if (element instanceof TypeElement typeElement) {
+ if (typeElement.getNestingKind() == NestingKind.TOP_LEVEL) {
+ return typeElement;
+ }
+ }
+ return getTopLevelClass(element.getEnclosingElement());
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Annotations.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Annotations.java
new file mode 100644
index 0000000000..c0086463fb
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Annotations.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import com.google.auto.service.AutoService;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.generators.IndentedWriter;
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassGeneratorContext;
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassModule;
+import dev.jorel.commandapi.annotations.reloaded.semantics.SemanticRuleContextData;
+import dev.jorel.commandapi.annotations.reloaded.parser.ParserUtils;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Processor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+import javax.tools.JavaFileObject;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.time.ZonedDateTime;
+import java.util.Comparator;
+import java.util.Optional;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * The main annotation processor for annotation-based arguments
+ */
+@AutoService(Processor.class)
+public class Annotations extends AbstractProcessor {
+ private final Configuration configuration;
+
+ /**
+ * Default constructor, uses default configuration
+ */
+ public Annotations() {
+ this(new DefaultConfiguration());
+ }
+
+ /**
+ * Constructor used for commandapi-annotations tests. Allows an alternate
+ * configuration to be provided for testing purposes.
+ */
+ public Annotations(Configuration configuration) {
+ this.configuration = configuration;
+ }
+
+ // List of stuff we can deal with
+ @Override
+ public Set getSupportedAnnotationTypes() {
+ return configuration.getSupportedAnnotationTypes();
+ }
+
+ @Override
+ public SourceVersion getSupportedSourceVersion() {
+ return SourceVersion.latestSupported();
+ }
+
+ @Override
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ Logging logging = new Logging(processingEnv);
+ CommandsClassModule baseModule = configuration.getBaseModule();
+
+ // We need to do multiple "phases".
+ // Firstly, we perform semantic analysis (checking that we've not got two @Default
+ // annotations, type checking of annotations to method parameter types, ensuring
+ // suggestions map to what they should), ensuring we've not got two commands of
+ // the same name...
+ SemanticRuleContextData semanticsContext = new SemanticRuleContextData(
+ logging,
+ processingEnv,
+ roundEnv,
+ configuration.getAnnotationUtils()
+ );
+ logging.info("Performing semantic checks");
+ boolean semanticsPassed = baseModule.allPass(semanticsContext);
+ logging.info("Semantic checks %s".formatted(semanticsPassed ? "passed" : "failed"));
+
+ // We then need to construct a context
+ // for each @Command class, which outlines the list of suggestion methods, its
+ // varying types, etc. You can think of this as a lexing/syntax analysis step.
+
+ TreeSet commandClasses = roundEnv.getElementsAnnotatedWith(Command.class).stream()
+ .map(TypeElement.class::cast) // Change the type of commandClasses -
+ // we're asserting it's a TypeElement (it literally can't be anything else)
+ .collect(Collectors.toCollection(() -> // We want things sorted :)
+ new TreeSet<>(Comparator.comparing(it -> it.getQualifiedName().toString())))
+ );
+ logging.info("Found %d @%s classes".formatted(commandClasses.size(), Command.class.getSimpleName()));
+ if (commandClasses.isEmpty()) {
+ logging.info("Nothing to do. Aborting.");
+ return true;
+ }
+
+ logging.info("Parsing contexts");
+ ParserUtils parserUtils = new ParserUtils(
+ logging,
+ processingEnv,
+ configuration.getImportsBuilder(),
+ configuration.getAnnotationUtils()
+ );
+ Optional maybeContexts = baseModule.parseAllContexts(
+ parserUtils,
+ configuration.getCommandsClassName(),
+ ZonedDateTime.now(),
+ commandClasses
+ );
+ logging.info("Contexts parsed %s".formatted(maybeContexts.isPresent() ? "successfully" : "unsuccessfully"));
+
+ if (!semanticsPassed || maybeContexts.isEmpty()) {
+ logging.info("Aborting");
+ return true;
+ }
+ CommandsClassGeneratorContext allContexts = maybeContexts.orElseThrow();
+ try {
+ logging.info("Generating %s class".formatted(configuration.getCommandsClassName()));
+ JavaFileObject builderFile = processingEnv
+ .getFiler()
+ .createSourceFile(configuration.getCommandsClassName());
+ try (PrintWriter out = new PrintWriter(builderFile.openWriter())) {
+ baseModule.generate(new IndentedWriter(out), allContexts);
+ }
+ logging.info("%s class generated".formatted(configuration.getCommandsClassName()));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ logging.info("Done");
+ return true;
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/BackReference.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/BackReference.java
new file mode 100644
index 0000000000..b43e61487a
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/BackReference.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import java.lang.ref.WeakReference;
+import java.util.Objects;
+
+/**
+ * A reference back to an object previously added to a data structure to allow for cyclical structures.
+ *
+ * This is intended to be used to handle situations where nesting occurs. Such as parsing subclasses within subclasses.
+ * //TODO this could be moved to a more general location
+ *
+ * @param The type of object referenced
+ */
+public class BackReference {
+ // Use a weak reference to make things easier on the garbage collector
+ private WeakReference objRef = null;
+
+ /**
+ * @param obj The object to store a reference to
+ * @throws IllegalStateException on an attempt to re-initialise. It is not possible to re-use.
+ * @throws NullPointerException if obj was null
+ */
+ public void initialise(T obj) {
+ if (objRef != null) {
+ throw new IllegalStateException("Attempted to initialise twice");
+ }
+ objRef = new WeakReference<>(Objects.requireNonNull(obj));
+ }
+
+ /**
+ * @return The object that was stored earlier
+ * @throws IllegalStateException if there was no call to {@link #initialise(Object)}
+ */
+ public T get() {
+ if (objRef == null) {
+ throw new IllegalStateException("Attempted to get before initialisation");
+ }
+ return Objects.requireNonNull(objRef.get());
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Configuration.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Configuration.java
new file mode 100644
index 0000000000..a4db2a3f44
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Configuration.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassModule;
+import dev.jorel.commandapi.annotations.reloaded.parser.ImportsBuilder;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+/**
+ * Interface for configuration data needed by the CommandAPI annotation system
+ */
+public interface Configuration {
+ /**
+ * Allows the Commands class name to be altered to prevent conflicts when running test cases
+ *
+ * @return The Commands class name to use when generating the class
+ */
+ String getCommandsClassName();
+
+ /**
+ * @return A set of all supported command argument annotations
+ */
+ Set> getArgumentAnnotations();
+
+ /**
+ * @return A set of all other supported command annotations
+ */
+ Set> getOtherAnnotations();
+
+ /**
+ * @return A set of the canonical names of all supported annotations
+ */
+ Set getSupportedAnnotationTypes();
+
+ /**
+ * @return The base module that contains the modular hierarchy for all features of the annotation processor
+ */
+ CommandsClassModule getBaseModule();
+
+ /**
+ * @return The imports builder to use for the generated commands class
+ */
+ ImportsBuilder getImportsBuilder();
+
+ /**
+ * @return Utility functions for working with java annotations
+ */
+ AnnotationUtils getAnnotationUtils();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/DefaultConfiguration.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/DefaultConfiguration.java
new file mode 100644
index 0000000000..edf3641ad8
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/DefaultConfiguration.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import dev.jorel.commandapi.annotations.reloaded.annotations.Command;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Executes;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Help;
+import dev.jorel.commandapi.annotations.reloaded.annotations.NeedsOp;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Permission;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommand;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Subcommands;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Suggestion;
+import dev.jorel.commandapi.annotations.reloaded.annotations.Suggests;
+import dev.jorel.commandapi.annotations.reloaded.arguments.ArgumentAnnotations;
+import dev.jorel.commandapi.annotations.reloaded.modules.arguments.CommandExecutorMethodArgumentsModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassImportsGenerator;
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassJavadocGenerator;
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.base.CommandsClassPackageGenerator;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandExecutorMethodBaseCommandNameParser;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandExecutorMethodExecutorModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandExecutorMethodModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandExecutorsModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandNamesParser;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandRegisterMethodJavadocGenerator;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.CommandRegisterMethodModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.commands.RuleCommandCanOnlyGoOnTopLevelClasses;
+import dev.jorel.commandapi.annotations.reloaded.modules.permissions.CommandExecutorMethodPermissionsModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.RuleNonTopLevelTypeSubCommandsMustGoInsideCommandOrSubcommandClasses;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.RuleNonTopLevelTypeSubcommandsCanOnlyGoInsideClasses;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.RuleTopLevelSubCommandClassesMustExtendCommandOrSubcommandClass;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.RuleTopLevelSubCommandClassesMustExtendParentClassWithExternalSubcommand;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.RuleTopLevelSubCommandClassesMustHaveASuperClass;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.RuleTypeSubCommandsCanOnlyGoOnNormalClasses;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.SubcommandClassModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.SubcommandClassesModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.SubcommandMethodsModule;
+import dev.jorel.commandapi.annotations.reloaded.modules.subcommands.SubcommandsModule;
+import dev.jorel.commandapi.annotations.reloaded.parser.ImportsBuilder;
+import dev.jorel.commandapi.annotations.reloaded.parser.ImportsBuilderImpl;
+
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * The default configuration for the CommandAPI annotation system
+ */
+public class DefaultConfiguration implements Configuration {
+ private static final String COMMANDS_CLASS_NAME = "Commands";
+
+ private static final Set> OTHER_ANNOTATIONS = Set.of(
+ Command.class,
+ NeedsOp.class,
+ Permission.class,
+ Help.class,
+ Suggestion.class,
+ Subcommand.class,
+ Subcommands.class,
+ Suggests.class,
+ Executes.class
+ );
+
+ @Override
+ public String getCommandsClassName() {
+ return COMMANDS_CLASS_NAME;
+ }
+
+ @Override
+ public Set> getArgumentAnnotations() {
+ return ArgumentAnnotations.ALL;
+ }
+
+ @Override
+ public Set> getOtherAnnotations() {
+ return OTHER_ANNOTATIONS;
+ }
+
+ @Override
+ public Set getSupportedAnnotationTypes() {
+ return Stream.of(
+ getArgumentAnnotations(),
+ getOtherAnnotations()
+ )
+ .flatMap(Collection::stream)
+ .map(Class::getCanonicalName)
+ .collect(Collectors.toSet());
+ }
+
+ private SubcommandClassModule getSubcommandClassModule() {
+ BackReference subcommandClassModuleRef = new BackReference<>();
+ SubcommandClassModule subcommandClassModule = new SubcommandClassModule(
+ new SubcommandClassesModule(
+ subcommandClassModuleRef
+ ), new SubcommandMethodsModule(
+ new CommandExecutorMethodModule(
+ new CommandExecutorMethodBaseCommandNameParser(
+ new CommandNamesParser()
+ ),
+ new CommandExecutorMethodPermissionsModule(),
+ new CommandExecutorMethodArgumentsModule(),
+ new CommandExecutorMethodExecutorModule()
+ )
+ ),
+ new CommandExecutorsModule(
+ new CommandExecutorMethodModule(
+ new CommandExecutorMethodBaseCommandNameParser(
+ new CommandNamesParser()
+ ),
+ new CommandExecutorMethodPermissionsModule(),
+ new CommandExecutorMethodArgumentsModule(),
+ new CommandExecutorMethodExecutorModule()
+ )
+ )
+ );
+ subcommandClassModuleRef.initialise(subcommandClassModule);
+ return subcommandClassModule;
+ }
+
+ @Override
+ public CommandsClassModule getBaseModule() {
+ return new CommandsClassModule(
+ new CommandsClassPackageGenerator(),
+ new CommandsClassImportsGenerator(),
+ new CommandsClassJavadocGenerator(),
+ new CommandRegisterMethodModule(
+ new RuleCommandCanOnlyGoOnTopLevelClasses(),
+ new CommandRegisterMethodJavadocGenerator(),
+ new SubcommandsModule(
+ new RuleNonTopLevelTypeSubCommandsMustGoInsideCommandOrSubcommandClasses(),
+ new RuleNonTopLevelTypeSubcommandsCanOnlyGoInsideClasses(),
+ new RuleTypeSubCommandsCanOnlyGoOnNormalClasses(),
+ new RuleTopLevelSubCommandClassesMustExtendParentClassWithExternalSubcommand(),
+ new RuleTopLevelSubCommandClassesMustHaveASuperClass(),
+ new RuleTopLevelSubCommandClassesMustExtendCommandOrSubcommandClass(),
+ getSubcommandClassModule()
+ )
+ )
+ );
+ }
+
+ @Override
+ public ImportsBuilder getImportsBuilder() {
+ return new ImportsBuilderImpl();
+ }
+
+ @Override
+ public AnnotationUtils getAnnotationUtils() {
+ return new AnnotationUtils();
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Logging.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Logging.java
new file mode 100644
index 0000000000..4af7a38662
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/Logging.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import javax.annotation.processing.Messager;
+import javax.annotation.processing.ProcessingEnvironment;
+import javax.lang.model.element.Element;
+import javax.tools.Diagnostic.Kind;
+
+/**
+ * A logger for the CommandAPI annotation system annotation processor
+ */
+public class Logging {
+
+ private final ProcessingEnvironment processingEnv;
+
+ public Logging(ProcessingEnvironment processor) {
+ this.processingEnv = processor;
+ }
+
+ public void complain(Element element, String message) {
+ System.out.println(message + " at " + element);
+ getMessager().printMessage(Kind.ERROR, message, element);
+ }
+
+ public void complain(String message) {
+ System.out.println(message);
+ getMessager().printMessage(Kind.ERROR, message);
+ }
+
+ public void warn(Element element, String message) {
+ getMessager().printMessage(Kind.MANDATORY_WARNING, message, element);
+ }
+
+ public void info(Element element, String message) {
+ getMessager().printMessage(Kind.NOTE, message, element);
+ }
+
+ public void info(Object message) {
+ getMessager().printMessage(Kind.NOTE, String.valueOf(message));
+ }
+
+ public Messager getMessager() {
+ return processingEnv.getMessager();
+ }
+
+ /*
+ typeElement.getAnnotationMirrors().forEach(mirror -> {
+ mirror.getElementValues();
+ logging.getMessager().printMessage(Kind.MANDATORY_WARNING, mirror.getElementValues().toString());
+ logging.getMessager().printMessage(Kind.MANDATORY_WARNING, mirror.getElementValues().toString(), typeElement, (AnnotationMirror)mirror);
+ });
+ */
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/ReturnTypesAreNonnullByDefault.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/ReturnTypesAreNonnullByDefault.java
new file mode 100644
index 0000000000..a7ef167421
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/ReturnTypesAreNonnullByDefault.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded;
+
+import javax.annotation.Nonnull;
+import javax.annotation.meta.TypeQualifierDefault;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * To be used in package-info.java to mark all return values as non-null by default
+ * // TODO: Move this to a more general location for the project
+ */
+@Nonnull
+@TypeQualifierDefault(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ReturnTypesAreNonnullByDefault {
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/ArgumentParser.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/ArgumentParser.java
new file mode 100644
index 0000000000..9d6c4ade2a
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/ArgumentParser.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright 2022 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to indicate that this class is a
+ * {@link dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfoParser} to be used for a
+ * {@link dev.jorel.commandapi.annotations.reloaded.arguments.ACustomArgument} in the CommandAPI annotation system
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface ArgumentParser {
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Command.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Command.java
new file mode 100644
index 0000000000..71f271b776
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Command.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation to indicate that this class is a command
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Command {
+
+ /**
+ * @return The name of the command that this class represents
+ */
+ String[] value();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Executes.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Executes.java
new file mode 100644
index 0000000000..4bdbd89a06
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Executes.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation to indicate that this method can be used as an executor for a command or subcommand
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Executes {
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/ExternalSubcommand.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/ExternalSubcommand.java
new file mode 100644
index 0000000000..001921972f
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/ExternalSubcommand.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation to indicate that this method is a subcommand defined in another class
+ */
+@Target({ ElementType.FIELD })
+@Retention(RetentionPolicy.SOURCE)
+public @interface ExternalSubcommand {
+
+ /**
+ * @return The names (and thus, aliases) of this subcommand
+ */
+ Class> value();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Help.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Help.java
new file mode 100644
index 0000000000..ff9e17e1bc
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Help.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation which includes information about the help for a command
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Help {
+
+ /**
+ * @return The full description for this command's help
+ */
+ String value();
+
+ /**
+ * @return The short description for this command's help
+ */
+ String shortDescription() default "";
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/NeedsOp.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/NeedsOp.java
new file mode 100644
index 0000000000..23a68bec19
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/NeedsOp.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation to apply to indicate that a command or subcommand requires being OP to use.
+ */
+@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD})
+@Retention(RetentionPolicy.SOURCE)
+public @interface NeedsOp {
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/NodeName.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/NodeName.java
new file mode 100644
index 0000000000..a280b1fc19
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/NodeName.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright 2022 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Explicitly state a node name, instead of using the field or parameter name
+ */
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Retention(RetentionPolicy.SOURCE)
+public @interface NodeName {
+
+ /**
+ * @return The name of this argument's node as shown in help
+ */
+ String value();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Permission.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Permission.java
new file mode 100644
index 0000000000..6ce46195e7
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Permission.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation to apply a permission to a command or subcommand
+ */
+@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD})
+@Retention(RetentionPolicy.SOURCE)
+public @interface Permission {
+
+ /**
+ * The permission literal that this argument represents
+ * @return the permission literal that this argument represents
+ */
+ String value();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Subcommand.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Subcommand.java
new file mode 100644
index 0000000000..c630d96476
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Subcommand.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The annotation to indicate that this method is a subcommand
+ */
+@Target( { ElementType.METHOD, ElementType.TYPE })
+@Retention(RetentionPolicy.SOURCE)
+@Repeatable(Subcommands.class)
+public @interface Subcommand {
+
+ /**
+ * The names (and thus, aliases) of this subcommand
+ * @return the names that this subcommand produces
+ */
+ String[] value() default {};
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Subcommands.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Subcommands.java
new file mode 100644
index 0000000000..dc475f92b7
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Subcommands.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * When Subcommand is used multiple times on the same element, this contains all of them.
+ */
+@Retention(RetentionPolicy.SOURCE)
+@Target( { ElementType.METHOD, ElementType.TYPE })
+public @interface Subcommands {
+
+ /**
+ * @return An ordered array of all Subcommand annotations on this element
+ */
+ Subcommand[] value();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Suggestion.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Suggestion.java
new file mode 100644
index 0000000000..46f1560b47
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Suggestion.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright 2022 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Suggestion {
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Suggests.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Suggests.java
new file mode 100644
index 0000000000..a39dd6f0d5
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/Suggests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright 2022 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import dev.jorel.commandapi.arguments.ISuggestions;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.function.Supplier;
+
+/**
+ * The annotation which contains a list of suggestions for an argument
+ */
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Retention(RetentionPolicy.SOURCE)
+public @interface Suggests {
+
+ /**
+ * @return A class that supplies a list of suggestions for an argument
+ */
+ Class extends Supplier extends ISuggestions>> value();
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/package-info.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/package-info.java
new file mode 100644
index 0000000000..1bb281b127
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/annotations/package-info.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+/**
+ * Annotations which can be used with the CommandAPI annotation system.
+ */
+@ParametersAreNonnullByDefault
+@ReturnTypesAreNonnullByDefault
+package dev.jorel.commandapi.annotations.reloaded.annotations;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+import dev.jorel.commandapi.annotations.reloaded.ReturnTypesAreNonnullByDefault;
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdvancementArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdvancementArgument.java
new file mode 100644
index 0000000000..d06a1579f9
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdvancementArgument.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.AdvancementArgument;
+
+/**
+ * Annotation equivalent of the {@link AdvancementArgument}
+ */
+@Primitive("org.bukkit.advancement.Advancement")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AAdvancementArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdventureChatArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdventureChatArgument.java
new file mode 100644
index 0000000000..3ff505f7e1
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdventureChatArgument.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.AdventureChatArgument;
+
+/**
+ * Annotation equivalent of the {@link AdventureChatArgument}
+ */
+@Primitive("net.kyori.adventure.text.Component")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AAdventureChatArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdventureChatComponentArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdventureChatComponentArgument.java
new file mode 100644
index 0000000000..2aa99e6481
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAdventureChatComponentArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.AdventureChatComponentArgument;
+
+/**
+ * Annotation equivalent of the {@link AdventureChatComponentArgument}
+ */
+@Primitive("net.kyori.adventure.text.Component")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AAdventureChatComponentArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAngleArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAngleArgument.java
new file mode 100644
index 0000000000..d046059a4b
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAngleArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.AngleArgument;
+
+/**
+ * Annotation equivalent of the {@link AngleArgument}
+ */
+@Primitive("float")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AAngleArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAxisArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAxisArgument.java
new file mode 100644
index 0000000000..056caf24b3
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AAxisArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.AxisArgument;
+
+/**
+ * Annotation equivalent of the {@link AxisArgument}
+ */
+@Primitive("java.util.EnumSet")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ ElementType.PARAMETER, ElementType.FIELD })
+public @interface AAxisArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABiomeArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABiomeArgument.java
new file mode 100644
index 0000000000..4ea2db758b
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABiomeArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.BiomeArgument;
+
+/**
+ * Annotation equivalent of the {@link BiomeArgument}
+ */
+@Primitive("org.bukkit.block.Biome")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ABiomeArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABlockPredicateArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABlockPredicateArgument.java
new file mode 100644
index 0000000000..aa9fa71311
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABlockPredicateArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.BlockPredicateArgument;
+
+/**
+ * Annotation equivalent of the {@link BlockPredicateArgument}
+ */
+@Primitive("java.util.function.Predicate")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ABlockPredicateArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABlockStateArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABlockStateArgument.java
new file mode 100644
index 0000000000..16a180f306
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABlockStateArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.BlockStateArgument;
+
+/**
+ * Annotation equivalent of the {@link BlockStateArgument}
+ */
+@Primitive("org.bukkit.block.data.BlockData")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ABlockStateArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABooleanArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABooleanArgument.java
new file mode 100644
index 0000000000..22c6d1983f
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ABooleanArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.BooleanArgument;
+
+/**
+ * Annotation equivalent of the {@link BooleanArgument}
+ */
+@Primitive("boolean")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ ElementType.PARAMETER, ElementType.FIELD })
+public @interface ABooleanArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatArgument.java
new file mode 100644
index 0000000000..2bea3b886b
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ChatArgument;
+
+/**
+ * Annotation equivalent of the {@link ChatArgument}
+ */
+@Primitive("net.md_5.bungee.api.chat.BaseComponent[]")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AChatArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatColorArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatColorArgument.java
new file mode 100644
index 0000000000..6ccb9890c3
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatColorArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ChatColorArgument;
+
+/**
+ * Annotation equivalent of the {@link ChatColorArgument}
+ */
+@Primitive("org.bukkit.ChatColor")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AChatColorArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatComponentArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatComponentArgument.java
new file mode 100644
index 0000000000..fab0508dc9
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AChatComponentArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ChatComponentArgument;
+
+/**
+ * Annotation equivalent of the {@link ChatComponentArgument}
+ */
+@Primitive("net.md_5.bungee.api.chat.BaseComponent[]")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AChatComponentArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ACustomArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ACustomArgument.java
new file mode 100644
index 0000000000..38d62cc8f7
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ACustomArgument.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ChatComponentArgument;
+import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfoParser;
+
+/**
+ * Annotation equivalent of the {@link dev.jorel.commandapi.arguments.CustomArgument}
+ */
+@Primitive("void")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ACustomArgument {
+
+ /**
+ * @return The class that parses the custom argument info
+ */
+ Class extends CustomArgumentInfoParser, ?>> value();
+
+ /**
+ * @return Whether this custom argument uses a NamespaceKeyedArgument as the base
+ */
+ boolean keyed() default false;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ADoubleArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ADoubleArgument.java
new file mode 100644
index 0000000000..2c2fccceb7
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ADoubleArgument.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.DoubleArgument;
+
+/**
+ * Annotation equivalent of the {@link DoubleArgument}
+ */
+@Primitive("double")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ADoubleArgument {
+
+ /**
+ * @return The minimum value this argument can take (inclusive)
+ */
+ double min() default -Double.MAX_VALUE;
+
+ /**
+ * @return The maximum value this argument can take (inclusive)
+ */
+ double max() default Double.MAX_VALUE;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEnchantmentArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEnchantmentArgument.java
new file mode 100644
index 0000000000..9fb7271a0a
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEnchantmentArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.EnchantmentArgument;
+
+/**
+ * Annotation equivalent of the {@link EnchantmentArgument}
+ */
+@Primitive("org.bukkit.enchantments.Enchantment")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AEnchantmentArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEntitySelectorArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEntitySelectorArgument.java
new file mode 100644
index 0000000000..d78a394c8d
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEntitySelectorArgument.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.EntitySelectorArgument;
+
+/**
+ * Annotation equivalent of the {@link EntitySelectorArgument}
+ */
+@Retention(RetentionPolicy.SOURCE)
+@Target({})
+public @interface AEntitySelectorArgument {
+ /**
+ * Annotation equivalent of the {@link EntitySelectorArgument.ManyPlayers}
+ */
+ @Primitive("java.util.Collection")
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.FIELD})
+ @interface ManyPlayers {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+ }
+
+ /**
+ * Annotation equivalent of the {@link EntitySelectorArgument.OnePlayer}
+ */
+ @Primitive("org.bukkit.entity.Player")
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.FIELD})
+ @interface OnePlayer {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+ }
+
+ /**
+ * Annotation equivalent of the {@link EntitySelectorArgument.ManyEntities}
+ */
+ @Primitive("java.util.Collection")
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.FIELD})
+ @interface ManyEntities {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+ }
+
+ /**
+ * Annotation equivalent of the {@link EntitySelectorArgument.OneEntity}
+ */
+ @Primitive("org.bukkit.entity.Entity")
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.FIELD})
+ @interface OneEntity {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEntityTypeArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEntityTypeArgument.java
new file mode 100644
index 0000000000..27420342f7
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AEntityTypeArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.EntityTypeArgument;
+
+/**
+ * Annotation equivalent of the {@link EntityTypeArgument}
+ */
+@Primitive("org.bukkit.entity.EntityType")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ ElementType.PARAMETER, ElementType.FIELD })
+public @interface AEntityTypeArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFloatArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFloatArgument.java
new file mode 100644
index 0000000000..7b2bf9ed44
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFloatArgument.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.FloatArgument;
+
+/**
+ * Annotation equivalent of the {@link FloatArgument}
+ */
+@Primitive("float")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AFloatArgument {
+
+ /**
+ * @return The minimum value this argument can take (inclusive)
+ */
+ float min() default -Float.MAX_VALUE;
+
+ /**
+ * @return The maximum value this argument can take (inclusive)
+ */
+ float max() default Float.MAX_VALUE;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFloatRangeArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFloatRangeArgument.java
new file mode 100644
index 0000000000..4325ad5bed
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFloatRangeArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.FloatRangeArgument;
+
+/**
+ * Annotation equivalent of the {@link FloatRangeArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.FloatRange")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AFloatRangeArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFunctionArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFunctionArgument.java
new file mode 100644
index 0000000000..681fc318eb
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AFunctionArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.FunctionArgument;
+
+/**
+ * Annotation equivalent of the {@link FunctionArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.FunctionWrapper[]")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AFunctionArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AGreedyStringArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AGreedyStringArgument.java
new file mode 100644
index 0000000000..e0280de058
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AGreedyStringArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.EntitySelectorArgument;
+
+/**
+ * Annotation equivalent of the {@link EntitySelectorArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AGreedyStringArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AIntegerArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AIntegerArgument.java
new file mode 100644
index 0000000000..9e57f185ef
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AIntegerArgument.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.IntegerArgument;
+
+/**
+ * Annotation equivalent of the {@link IntegerArgument}
+ */
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Primitive("int")
+public @interface AIntegerArgument {
+
+ /**
+ * @return The minimum value this argument can take (inclusive)
+ */
+ int min() default Integer.MIN_VALUE;
+
+ /**
+ * @return The maximum value this argument can take (inclusive)
+ */
+ int max() default Integer.MAX_VALUE;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AIntegerRangeArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AIntegerRangeArgument.java
new file mode 100644
index 0000000000..55ef386576
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AIntegerRangeArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.IntegerRangeArgument;
+
+/**
+ * Annotation equivalent of the {@link IntegerRangeArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.IntegerRange")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AIntegerRangeArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AItemStackArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AItemStackArgument.java
new file mode 100644
index 0000000000..762e4a9fb3
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AItemStackArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ItemStackArgument;
+
+/**
+ * Annotation equivalent of the {@link ItemStackArgument}
+ */
+@Primitive("org.bukkit.inventory.ItemStack")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AItemStackArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AItemStackPredicateArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AItemStackPredicateArgument.java
new file mode 100644
index 0000000000..a495703d39
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AItemStackPredicateArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ItemStackPredicateArgument;
+
+/**
+ * Annotation equivalent of the {@link ItemStackPredicateArgument}
+ */
+@Primitive("java.util.function.Predicate")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AItemStackPredicateArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALiteralArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALiteralArgument.java
new file mode 100644
index 0000000000..21cd7280b9
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALiteralArgument.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.LiteralArgument;
+
+/**
+ * Annotation equivalent of the {@link LiteralArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Deprecated(forRemoval = false, since = "8.0.0")
+public @interface ALiteralArgument {
+
+ /**
+ * @return the string literal that this argument will represent
+ */
+ String value();
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALocation2DArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALocation2DArgument.java
new file mode 100644
index 0000000000..81c2f2f050
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALocation2DArgument.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.Location2DArgument;
+import dev.jorel.commandapi.arguments.LocationType;
+
+/**
+ * Annotation equivalent of the {@link Location2DArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.Location2D")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ALocation2DArgument {
+
+ /**
+ * @return the location type of this location, either
+ * {@link LocationType#BLOCK_POSITION} or
+ * {@link LocationType#PRECISE_POSITION}. Defaults to
+ * {@link LocationType#PRECISE_POSITION}
+ */
+ LocationType value() default LocationType.PRECISE_POSITION;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALocationArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALocationArgument.java
new file mode 100644
index 0000000000..a513e643e3
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALocationArgument.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.LocationArgument;
+import dev.jorel.commandapi.arguments.LocationType;
+
+/**
+ * Annotation equivalent of the {@link LocationArgument}
+ */
+@Primitive("org.bukkit.Location")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ALocationArgument {
+
+ /**
+ * @return the location type of this location, either
+ * {@link LocationType#BLOCK_POSITION} or
+ * {@link LocationType#PRECISE_POSITION}. Defaults to
+ * {@link LocationType#PRECISE_POSITION}
+ */
+ LocationType value() default LocationType.PRECISE_POSITION;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALongArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALongArgument.java
new file mode 100644
index 0000000000..55d5941a05
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALongArgument.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.LongArgument;
+
+/**
+ * Annotation equivalent of the {@link LongArgument}
+ */
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Primitive("long")
+public @interface ALongArgument {
+
+ /**
+ * @return The minimum value this argument can take (inclusive)
+ */
+ long min() default Long.MIN_VALUE;
+
+ /**
+ * @return The maximum value this argument can take (inclusive)
+ */
+ long max() default Long.MAX_VALUE;
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALootTableArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALootTableArgument.java
new file mode 100644
index 0000000000..007c4e6520
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ALootTableArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.LootTableArgument;
+
+/**
+ * Annotation equivalent of the {@link LootTableArgument}
+ */
+@Primitive("org.bukkit.loot.LootTable")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ALootTableArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AMathOperationArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AMathOperationArgument.java
new file mode 100644
index 0000000000..2f1d29a164
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AMathOperationArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.MathOperationArgument;
+
+/**
+ * Annotation equivalent of the {@link MathOperationArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.MathOperation")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AMathOperationArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AMultiLiteralArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AMultiLiteralArgument.java
new file mode 100644
index 0000000000..146d7d31e1
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AMultiLiteralArgument.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.MultiLiteralArgument;
+
+/**
+ * Annotation equivalent of the {@link MultiLiteralArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ ElementType.PARAMETER, ElementType.FIELD })
+public @interface AMultiLiteralArgument {
+
+ /**
+ * @return the literals that this argument represents
+ */
+ String[] value();
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ANBTCompoundArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ANBTCompoundArgument.java
new file mode 100644
index 0000000000..133d07d27d
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ANBTCompoundArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.NBTCompoundArgument;
+
+/**
+ * Annotation equivalent of the {@link NBTCompoundArgument}
+ */
+@Primitive({})
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ANBTCompoundArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ANamespacedKeyArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ANamespacedKeyArgument.java
new file mode 100644
index 0000000000..04cb2b7078
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ANamespacedKeyArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.NamespacedKeyArgument;
+
+/**
+ * Annotation equivalent of the {@link NamespacedKeyArgument}
+ */
+@Primitive("org.bukkit.NamespacedKey")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ ElementType.PARAMETER, ElementType.FIELD })
+public @interface ANamespacedKeyArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AObjectiveArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AObjectiveArgument.java
new file mode 100644
index 0000000000..9af682f37f
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AObjectiveArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ObjectiveArgument;
+
+/**
+ * Annotation equivalent of the {@link ObjectiveArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AObjectiveArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AObjectiveCriteriaArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AObjectiveCriteriaArgument.java
new file mode 100644
index 0000000000..250960b3ed
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AObjectiveCriteriaArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ObjectiveCriteriaArgument;
+
+/**
+ * Annotation equivalent of the {@link ObjectiveCriteriaArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AObjectiveCriteriaArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AOfflinePlayerArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AOfflinePlayerArgument.java
new file mode 100644
index 0000000000..bb7f5bc1f1
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AOfflinePlayerArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.OfflinePlayerArgument;
+
+/**
+ * Annotation equivalent of the {@link OfflinePlayerArgument}
+ */
+@Primitive("org.bukkit.OfflinePlayer")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AOfflinePlayerArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AParticleArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AParticleArgument.java
new file mode 100644
index 0000000000..8156dd710d
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AParticleArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ParticleArgument;
+
+/**
+ * Annotation equivalent of the {@link ParticleArgument}
+ */
+@Primitive("org.bukkit.Particle")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AParticleArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/APlayerArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/APlayerArgument.java
new file mode 100644
index 0000000000..6f1a22e246
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/APlayerArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.PlayerArgument;
+
+/**
+ * Annotation equivalent of the {@link PlayerArgument}
+ */
+@Primitive("org.bukkit.entity.Player")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface APlayerArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/APotionEffectArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/APotionEffectArgument.java
new file mode 100644
index 0000000000..495534906a
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/APotionEffectArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.PotionEffectArgument;
+
+/**
+ * Annotation equivalent of the {@link PotionEffectArgument}
+ */
+@Primitive("org.bukkit.potion.PotionEffectType")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface APotionEffectArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ARecipeArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ARecipeArgument.java
new file mode 100644
index 0000000000..c0b48a5d6c
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ARecipeArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.RecipeArgument;
+
+/**
+ * Annotation equivalent of the {@link RecipeArgument}
+ */
+@Primitive("org.bukkit.inventory.Recipe")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ARecipeArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ARotationArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ARotationArgument.java
new file mode 100644
index 0000000000..093c20d967
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ARotationArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.RotationArgument;
+
+/**
+ * Annotation equivalent of the {@link RotationArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.Rotation")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ARotationArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AScoreHolderArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AScoreHolderArgument.java
new file mode 100644
index 0000000000..1cca95453b
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AScoreHolderArgument.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ScoreHolderArgument;
+
+/**
+ * Annotation equivalent of the {@link ScoreHolderArgument}
+ */
+@Retention(RetentionPolicy.SOURCE)
+@Target({})
+public @interface AScoreHolderArgument {
+ /**
+ * Annotation equivalent of the {@link ScoreHolderArgument.Single}
+ */
+ @Primitive("java.lang.String")
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.FIELD})
+ @interface Single {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+ }
+
+ /**
+ * Annotation equivalent of the {@link ScoreHolderArgument.Multiple}
+ */
+ @Primitive("java.util.Collection")
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.FIELD})
+ @interface Multiple {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AScoreboardSlotArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AScoreboardSlotArgument.java
new file mode 100644
index 0000000000..5103578bb9
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AScoreboardSlotArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.ScoreboardSlotArgument;
+
+/**
+ * Annotation equivalent of the {@link ScoreboardSlotArgument}
+ */
+@Primitive("dev.jorel.commandapi.wrappers.ScoreboardSlot")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AScoreboardSlotArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ASoundArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ASoundArgument.java
new file mode 100644
index 0000000000..57c9390b48
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ASoundArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.SoundArgument;
+
+/**
+ * Annotation equivalent of the {@link SoundArgument}
+ */
+@Primitive("org.bukkit.Sound")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ASoundArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AStringArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AStringArgument.java
new file mode 100644
index 0000000000..bc9db3ad35
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AStringArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.StringArgument;
+
+/**
+ * Annotation equivalent of the {@link StringArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AStringArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATeamArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATeamArgument.java
new file mode 100644
index 0000000000..f6b13c135d
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATeamArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.TeamArgument;
+
+/**
+ * Annotation equivalent of the {@link TeamArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ATeamArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATextArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATextArgument.java
new file mode 100644
index 0000000000..ed7ec9fcda
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATextArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.TextArgument;
+
+/**
+ * Annotation equivalent of the {@link TextArgument}
+ */
+@Primitive("java.lang.String")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ATextArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATimeArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATimeArgument.java
new file mode 100644
index 0000000000..61bbabcd08
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ATimeArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.TimeArgument;
+
+/**
+ * Annotation equivalent of the {@link TimeArgument}
+ */
+@Primitive("int")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface ATimeArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AUUIDArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AUUIDArgument.java
new file mode 100644
index 0000000000..b099330e95
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AUUIDArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.UUIDArgument;
+
+/**
+ * Annotation equivalent of the {@link UUIDArgument}
+ */
+@Primitive("java.util.UUID")
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+public @interface AUUIDArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AWorldArgument.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AWorldArgument.java
new file mode 100644
index 0000000000..016072d997
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/AWorldArgument.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2022 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import dev.jorel.commandapi.arguments.WorldArgument;
+
+/**
+ * Annotation equivalent of the {@link WorldArgument}
+ */
+@Primitive("org.bukkit.World")
+@Retention(RetentionPolicy.SOURCE)
+@Target(ElementType.PARAMETER)
+public @interface AWorldArgument {
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional() default false;
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ArgumentAnnotations.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ArgumentAnnotations.java
new file mode 100644
index 0000000000..2f1182effb
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/ArgumentAnnotations.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.ArgumentAnnotation;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.ArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.ArgumentListedOption;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.CustomArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.DoubleArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.FloatArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.IntegerArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.LocationArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.LongArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.MultiLiteralArgumentAnnotationProperties;
+import dev.jorel.commandapi.annotations.reloaded.arguments.utils.PrimitiveType;
+import dev.jorel.commandapi.arguments.AdvancementArgument;
+import dev.jorel.commandapi.arguments.AdventureChatArgument;
+import dev.jorel.commandapi.arguments.AdventureChatComponentArgument;
+import dev.jorel.commandapi.arguments.AngleArgument;
+import dev.jorel.commandapi.arguments.AxisArgument;
+import dev.jorel.commandapi.arguments.BiomeArgument;
+import dev.jorel.commandapi.arguments.BlockPredicateArgument;
+import dev.jorel.commandapi.arguments.BlockStateArgument;
+import dev.jorel.commandapi.arguments.BooleanArgument;
+import dev.jorel.commandapi.arguments.ChatArgument;
+import dev.jorel.commandapi.arguments.ChatColorArgument;
+import dev.jorel.commandapi.arguments.ChatComponentArgument;
+import dev.jorel.commandapi.arguments.CustomArgument;
+import dev.jorel.commandapi.arguments.DoubleArgument;
+import dev.jorel.commandapi.arguments.EnchantmentArgument;
+import dev.jorel.commandapi.arguments.EntitySelectorArgument;
+import dev.jorel.commandapi.arguments.EntityTypeArgument;
+import dev.jorel.commandapi.arguments.FloatArgument;
+import dev.jorel.commandapi.arguments.FloatRangeArgument;
+import dev.jorel.commandapi.arguments.FunctionArgument;
+import dev.jorel.commandapi.arguments.GreedyStringArgument;
+import dev.jorel.commandapi.arguments.IntegerArgument;
+import dev.jorel.commandapi.arguments.IntegerRangeArgument;
+import dev.jorel.commandapi.arguments.ItemStackArgument;
+import dev.jorel.commandapi.arguments.ItemStackPredicateArgument;
+import dev.jorel.commandapi.arguments.LiteralArgument;
+import dev.jorel.commandapi.arguments.Location2DArgument;
+import dev.jorel.commandapi.arguments.LocationArgument;
+import dev.jorel.commandapi.arguments.LongArgument;
+import dev.jorel.commandapi.arguments.LootTableArgument;
+import dev.jorel.commandapi.arguments.MathOperationArgument;
+import dev.jorel.commandapi.arguments.MultiLiteralArgument;
+import dev.jorel.commandapi.arguments.NBTCompoundArgument;
+import dev.jorel.commandapi.arguments.NamespacedKeyArgument;
+import dev.jorel.commandapi.arguments.ObjectiveArgument;
+import dev.jorel.commandapi.arguments.ObjectiveCriteriaArgument;
+import dev.jorel.commandapi.arguments.OfflinePlayerArgument;
+import dev.jorel.commandapi.arguments.ParticleArgument;
+import dev.jorel.commandapi.arguments.PlayerArgument;
+import dev.jorel.commandapi.arguments.PotionEffectArgument;
+import dev.jorel.commandapi.arguments.RecipeArgument;
+import dev.jorel.commandapi.arguments.RotationArgument;
+import dev.jorel.commandapi.arguments.ScoreHolderArgument;
+import dev.jorel.commandapi.arguments.ScoreboardSlotArgument;
+import dev.jorel.commandapi.arguments.SoundArgument;
+import dev.jorel.commandapi.arguments.StringArgument;
+import dev.jorel.commandapi.arguments.TeamArgument;
+import dev.jorel.commandapi.arguments.TextArgument;
+import dev.jorel.commandapi.arguments.TimeArgument;
+import dev.jorel.commandapi.arguments.UUIDArgument;
+import dev.jorel.commandapi.arguments.WorldArgument;
+
+import java.lang.annotation.Annotation;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * TODO: This class should be generated automatically
+ */
+@SuppressWarnings("deprecation")
+public class ArgumentAnnotations {
+ /**
+ * Using a LinkedHashSet to maintain order. We want to have primitives early
+ * on in the list so that they are chosen early in predictions
+ */
+ public static final Set> ALL = Stream.of(
+ AAdvancementArgument.class, AAdventureChatArgument.class, AAdventureChatComponentArgument.class,
+ AAngleArgument.class, AAxisArgument.class, ABiomeArgument.class, ABlockPredicateArgument.class,
+ ABlockStateArgument.class, ABooleanArgument.class, AChatArgument.class, AChatColorArgument.class,
+ AChatComponentArgument.class, ADoubleArgument.class, AEnchantmentArgument.class,
+
+ AEntitySelectorArgument.ManyPlayers.class,
+ AEntitySelectorArgument.OnePlayer.class,
+ AEntitySelectorArgument.ManyEntities.class,
+ AEntitySelectorArgument.OneEntity.class,
+
+ AEntityTypeArgument.class, AFloatArgument.class, AFloatRangeArgument.class, AFunctionArgument.class,
+ AGreedyStringArgument.class, AIntegerArgument.class, AIntegerRangeArgument.class,
+ AItemStackArgument.class, AItemStackPredicateArgument.class, ALiteralArgument.class,
+ ALocation2DArgument.class, ALocationArgument.class, ALongArgument.class, ALootTableArgument.class,
+ AMathOperationArgument.class, AMultiLiteralArgument.class, ANamespacedKeyArgument.class,
+ ANBTCompoundArgument.class, AObjectiveArgument.class, AObjectiveCriteriaArgument.class,
+ AOfflinePlayerArgument.class, AParticleArgument.class, APlayerArgument.class,
+ APotionEffectArgument.class, ARecipeArgument.class, ARotationArgument.class,
+ AScoreboardSlotArgument.class,
+
+ AScoreHolderArgument.Single.class,
+ AScoreHolderArgument.Multiple.class,
+
+ ASoundArgument.class,
+ AStringArgument.class, ATeamArgument.class, ATextArgument.class, ATimeArgument.class,
+ AUUIDArgument.class, AWorldArgument.class
+ )
+ .collect(Collectors.toCollection(LinkedHashSet::new));
+
+ public static ArgumentAnnotation from(Annotation annotation, String nodeName) {
+ Class extends Annotation> type = annotation.annotationType();
+ PrimitiveType primitiveType = new PrimitiveType(type.getAnnotation(Primitive.class).value());
+ if (annotation instanceof AAdvancementArgument arg) { return new ArgumentAnnotationProperties(type, AdvancementArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AAdventureChatArgument arg) { return new ArgumentAnnotationProperties(type, AdventureChatArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AAdventureChatComponentArgument arg) { return new ArgumentAnnotationProperties(type, AdventureChatComponentArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AAngleArgument arg) { return new ArgumentAnnotationProperties(type, AngleArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AAxisArgument arg) { return new ArgumentAnnotationProperties(type, AxisArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ABiomeArgument arg) { return new ArgumentAnnotationProperties(type, BiomeArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ABlockPredicateArgument arg) { return new ArgumentAnnotationProperties(type, BlockPredicateArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ABlockStateArgument arg) { return new ArgumentAnnotationProperties(type, BlockStateArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ABooleanArgument arg) { return new ArgumentAnnotationProperties(type, BooleanArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AChatArgument arg) { return new ArgumentAnnotationProperties(type, ChatArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AChatColorArgument arg) { return new ArgumentAnnotationProperties(type, ChatColorArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AChatComponentArgument arg) { return new ArgumentAnnotationProperties(type, ChatComponentArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ACustomArgument arg) { return new CustomArgumentAnnotationProperties(type, CustomArgument.class, primitiveType, nodeName, arg.optional(), arg.value(), arg.keyed());
+ } else if (annotation instanceof ADoubleArgument arg) { return new DoubleArgumentAnnotationProperties(type, DoubleArgument.class, primitiveType, nodeName, arg.optional(), arg.min(), arg.max());
+ } else if (annotation instanceof AEnchantmentArgument arg) { return new ArgumentAnnotationProperties(type, EnchantmentArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AEntitySelectorArgument.ManyEntities arg) { return new ArgumentAnnotationProperties(type, EntitySelectorArgument.ManyEntities.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AEntitySelectorArgument.ManyPlayers arg) { return new ArgumentAnnotationProperties(type, EntitySelectorArgument.ManyPlayers.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AEntitySelectorArgument.OneEntity arg) { return new ArgumentAnnotationProperties(type, EntitySelectorArgument.OneEntity.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AEntitySelectorArgument.OnePlayer arg) { return new ArgumentAnnotationProperties(type, EntitySelectorArgument.OnePlayer.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AEntityTypeArgument arg) { return new ArgumentAnnotationProperties(type, EntityTypeArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AFloatArgument arg) { return new FloatArgumentAnnotationProperties(type, FloatArgument.class, primitiveType, nodeName, arg.optional(), arg.min(), arg.max());
+ } else if (annotation instanceof AFloatRangeArgument arg) { return new ArgumentAnnotationProperties(type, FloatRangeArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AFunctionArgument arg) { return new ArgumentAnnotationProperties(type, FunctionArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AGreedyStringArgument arg) { return new ArgumentAnnotationProperties(type, GreedyStringArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AIntegerArgument arg) { return new IntegerArgumentAnnotationProperties(type, IntegerArgument.class, primitiveType, nodeName, arg.optional(), arg.min(), arg.max());
+ } else if (annotation instanceof AIntegerRangeArgument arg) { return new ArgumentAnnotationProperties(type, IntegerRangeArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AItemStackArgument arg) { return new ArgumentAnnotationProperties(type, ItemStackArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AItemStackPredicateArgument arg) { return new ArgumentAnnotationProperties(type, ItemStackPredicateArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ALiteralArgument arg) { return new ArgumentAnnotationProperties(type, LiteralArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ALocation2DArgument arg) { return new LocationArgumentAnnotationProperties(type, Location2DArgument.class, primitiveType, nodeName, arg.optional(), arg.value());
+ } else if (annotation instanceof ALocationArgument arg) { return new LocationArgumentAnnotationProperties(type, LocationArgument.class, primitiveType, nodeName, arg.optional(), arg.value());
+ } else if (annotation instanceof ALongArgument arg) { return new LongArgumentAnnotationProperties(type, LongArgument.class, primitiveType, nodeName, arg.optional(), arg.min(), arg.max());
+ } else if (annotation instanceof ALootTableArgument arg) { return new ArgumentAnnotationProperties(type, LootTableArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AMathOperationArgument arg) { return new ArgumentAnnotationProperties(type, MathOperationArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AMultiLiteralArgument arg) { return new MultiLiteralArgumentAnnotationProperties(type, MultiLiteralArgument.class, primitiveType, nodeName, ArgumentListedOption.DEFAULT, arg.optional(), arg.value());
+ } else if (annotation instanceof ANBTCompoundArgument arg) { return new ArgumentAnnotationProperties(type, NBTCompoundArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ANamespacedKeyArgument arg) { return new ArgumentAnnotationProperties(type, NamespacedKeyArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AObjectiveArgument arg) { return new ArgumentAnnotationProperties(type, ObjectiveArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AObjectiveCriteriaArgument arg) { return new ArgumentAnnotationProperties(type, ObjectiveCriteriaArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AOfflinePlayerArgument arg) { return new ArgumentAnnotationProperties(type, OfflinePlayerArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AParticleArgument arg) { return new ArgumentAnnotationProperties(type, ParticleArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof APlayerArgument arg) { return new ArgumentAnnotationProperties(type, PlayerArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof APotionEffectArgument arg) { return new ArgumentAnnotationProperties(type, PotionEffectArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ARecipeArgument arg) { return new ArgumentAnnotationProperties(type, RecipeArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ARotationArgument arg) { return new ArgumentAnnotationProperties(type, RotationArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AScoreHolderArgument.Multiple arg) { return new ArgumentAnnotationProperties(type, ScoreHolderArgument.Multiple.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AScoreHolderArgument.Single arg) { return new ArgumentAnnotationProperties(type, ScoreHolderArgument.Single.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AScoreboardSlotArgument arg) { return new ArgumentAnnotationProperties(type, ScoreboardSlotArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ASoundArgument arg) { return new ArgumentAnnotationProperties(type, SoundArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AStringArgument arg) { return new ArgumentAnnotationProperties(type, StringArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ATeamArgument arg) { return new ArgumentAnnotationProperties(type, TeamArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ATextArgument arg) { return new ArgumentAnnotationProperties(type, TextArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof ATimeArgument arg) { return new ArgumentAnnotationProperties(type, TimeArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AUUIDArgument arg) { return new ArgumentAnnotationProperties(type, UUIDArgument.class, primitiveType, nodeName, arg.optional());
+ } else if (annotation instanceof AWorldArgument arg) { return new ArgumentAnnotationProperties(type, WorldArgument.class, primitiveType, nodeName, arg.optional());
+ }
+ throw new IllegalArgumentException("%s is not a %s"
+ .formatted(annotation, ArgumentAnnotation.class));
+ }
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/Primitive.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/Primitive.java
new file mode 100644
index 0000000000..f766c1d825
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/Primitive.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Tells the annotation processor that this primitive argument's casting type is
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface Primitive {
+
+ /**
+ * @return The class or classes that this argument represents. This should be fully qualified (with dots) and
+ * include any generics (also fully qualified)
+ */
+ String[] value();
+
+}
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/package-info.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/package-info.java
new file mode 100644
index 0000000000..0b86ec871b
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/package-info.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright 2018, 2023 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+/**
+ * Argument annotations which can be used with the CommandAPI annotation system.
+ */
+package dev.jorel.commandapi.annotations.reloaded.arguments;
\ No newline at end of file
diff --git a/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/utils/ArgumentAnnotation.java b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/utils/ArgumentAnnotation.java
new file mode 100644
index 0000000000..54e4441b96
--- /dev/null
+++ b/commandapi-annotations-reloaded/src/main/java/dev/jorel/commandapi/annotations/reloaded/arguments/utils/ArgumentAnnotation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright 2018, 2020 Jorel Ali (Skepter) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+package dev.jorel.commandapi.annotations.reloaded.arguments.utils;
+
+import dev.jorel.commandapi.arguments.Argument;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+/**
+ * An interface that applies to all argument annotation classes
+ */
+public interface ArgumentAnnotation {
+ /**
+ * @return The class of the annotation this mirrors
+ */
+ Class extends Annotation> annotationType();
+
+ /**
+ * @return The class of the argument this uses
+ */
+ @SuppressWarnings("rawtypes")
+ Class extends Argument> argumentType();
+
+ /**
+ * @return The variable types this argument parses to
+ */
+ PrimitiveType primitiveType();
+
+ /**
+ * @return The name of the command node and the variable this annotation is attached to
+ */
+ String nodeName();
+
+ /**
+ * @return Whether this argument should be marked as an optional argument
+ */
+ boolean optional();
+
+ /**
+ * @return True, if this argument should be listed in the Object args[] of the command executor
+ */
+ default ArgumentListedOption listed() {
+ return ArgumentListedOption.DEFAULT;
+ }
+
+ /**
+ * @return The serialized arguments to be passed to the constructor
+ */
+ default List