Let users set their own homes, disabled logging on something
This commit is contained in:
parent
31a8027157
commit
43b81556bf
@ -6,7 +6,7 @@
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
+
|
+
|
||||||
+ if (p_198484_2_ == GameType.CREATIVE) { //Patched
|
+ if (p_198484_2_ == GameType.CREATIVE) { //Patched
|
||||||
+ p_198484_0_.getSource().func_197030_a(new TranslationTextComponent("<Server> Creative mode? What are you, a cheater?"), true); //Patched
|
+ p_198484_0_.getSource().func_197030_a(new TranslationTextComponent("<Server> Creative mode? What are you, a cheater?"), false); //Patched
|
||||||
+ } //Patched
|
+ } //Patched
|
||||||
|
|
||||||
for(ServerPlayerEntity serverplayerentity : p_198484_1_) {
|
for(ServerPlayerEntity serverplayerentity : p_198484_1_) {
|
||||||
|
@ -31,9 +31,23 @@ public class HomeCommand {
|
|||||||
source.getSource().func_197030_a(new TranslationTextComponent("Teleported to home"), true);
|
source.getSource().func_197030_a(new TranslationTextComponent("Teleported to home"), true);
|
||||||
return 1;
|
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);
|
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"));
|
PlayerData player = Config.getPlayer(StringArgumentType.getString(source, "UUID"));
|
||||||
ServerPlayerEntity playerEntity = source.getSource().func_197035_h();
|
ServerPlayerEntity playerEntity = source.getSource().func_197035_h();
|
||||||
double x = playerEntity.field_70165_t;
|
double x = playerEntity.field_70165_t;
|
||||||
|
Reference in New Issue
Block a user