diff --git a/patches/net/minecraft/command/impl/GameModeCommand.patch b/patches/net/minecraft/command/impl/GameModeCommand.patch index 4e367b6..60a60b9 100644 --- a/patches/net/minecraft/command/impl/GameModeCommand.patch +++ b/patches/net/minecraft/command/impl/GameModeCommand.patch @@ -6,7 +6,7 @@ int i = 0; + + if (p_198484_2_ == GameType.CREATIVE) { //Patched -+ p_198484_0_.getSource().func_197030_a(new TranslationTextComponent(" Creative mode? What are you, a cheater?"), true); //Patched ++ p_198484_0_.getSource().func_197030_a(new TranslationTextComponent(" Creative mode? What are you, a cheater?"), false); //Patched + } //Patched for(ServerPlayerEntity serverplayerentity : p_198484_1_) { diff --git a/src/party/_2a03/command/HomeCommand.java b/src/party/_2a03/command/HomeCommand.java index c34754d..2ff2ada 100644 --- a/src/party/_2a03/command/HomeCommand.java +++ b/src/party/_2a03/command/HomeCommand.java @@ -31,9 +31,23 @@ public class HomeCommand { source.getSource().func_197030_a(new TranslationTextComponent("Teleported to home"), true); return 1; }); - literalargumentbuilder.then(Commands.func_197057_a("set").then(Commands.func_197056_a("UUID", StringArgumentType.word()).requires((source) -> { + literalargumentbuilder.then(Commands.func_197057_a("set").executes((source) -> { + PlayerData player = Config.getPlayer(source.getSource().func_197035_h().func_110124_au().toString()); + ServerPlayerEntity playerEntity = source.getSource().func_197035_h(); + double x = playerEntity.field_70165_t; + double y = playerEntity.field_70163_u; + double z = playerEntity.field_70161_v; + float yaw = playerEntity.field_70177_z; + float pitch = playerEntity.field_70125_A; + PlayerPosition location = new PlayerPosition(x, y, z, yaw, pitch); + player.setHome(location); + Config.setPlayer(player); + source.getSource().func_197030_a(new TranslationTextComponent("Your home has been updated"), true); + return 1; + })); + literalargumentbuilder.then(Commands.func_197057_a("sudoset").requires((source) -> { return source.func_197034_c(2); - }).executes((source) -> { + }).then(Commands.func_197056_a("UUID", StringArgumentType.word()).executes((source) -> { PlayerData player = Config.getPlayer(StringArgumentType.getString(source, "UUID")); ServerPlayerEntity playerEntity = source.getSource().func_197035_h(); double x = playerEntity.field_70165_t;