Fix homes command not accepting an argument

This commit is contained in:
zontreck 2024-04-30 21:30:31 -07:00
parent 570c5b9ddd
commit dcef07530e
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ mod_name=Aria's Essentials
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3 mod_license=GPLv3
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1201.2.043024.1653 mod_version=1201.2.043024.2130
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -23,7 +23,7 @@ public class HomeCommand {
public static void register(CommandDispatcher<CommandSourceStack> dispatcher) public static void register(CommandDispatcher<CommandSourceStack> dispatcher)
{ {
dispatcher.register(Commands.literal("home").executes(c-> home(c.getSource(), "default")) dispatcher.register(Commands.literal("home").executes(c-> home(c.getSource(), "default"))
.then(Commands.argument("nickname", StringArgumentType.string()))); .then(Commands.argument("nickname", StringArgumentType.string())).executes(c->home(c.getSource(), StringArgumentType.getString(c, "nickname"))));
//dispatcher.register(Commands.literal("sethome").then(Commands.argument("nickname", StringArgumentType.string())).executes(command -> { //dispatcher.register(Commands.literal("sethome").then(Commands.argument("nickname", StringArgumentType.string())).executes(command -> {
//String arg = StringArgumentType.getString(command, "nickname"); //String arg = StringArgumentType.getString(command, "nickname");