From 1a3f5c3f9d4255835244c3243c8e9386082ff166 Mon Sep 17 00:00:00 2001 From: zontreck Date: Wed, 1 May 2024 14:08:08 -0700 Subject: [PATCH] Fix homes command not accepting an argument --- gradle.properties | 2 +- .../dev/zontreck/essentials/commands/homes/HomeCommand.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 938d1c1..273f598 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1201.2.043024.2130 +mod_version=1201.2.050124.1406 # 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. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/essentials/commands/homes/HomeCommand.java b/src/main/java/dev/zontreck/essentials/commands/homes/HomeCommand.java index 4c5fc35..6787eb9 100644 --- a/src/main/java/dev/zontreck/essentials/commands/homes/HomeCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/homes/HomeCommand.java @@ -22,8 +22,7 @@ import net.minecraftforge.common.MinecraftForge; public class HomeCommand { public static void register(CommandDispatcher dispatcher) { - dispatcher.register(Commands.literal("home").executes(c-> home(c.getSource(), "default")) - .then(Commands.argument("nickname", StringArgumentType.string())).executes(c->home(c.getSource(), StringArgumentType.getString(c, "nickname")))); + dispatcher.register(Commands.literal("home").executes(c-> home(c.getSource(), "default")).then(Commands.argument("name", StringArgumentType.string()).executes(c->home(c.getSource(), StringArgumentType.getString(c, "name"))))); //dispatcher.register(Commands.literal("sethome").then(Commands.argument("nickname", StringArgumentType.string())).executes(command -> { //String arg = StringArgumentType.getString(command, "nickname");