|
|
@ -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; |
|
|
|