This commit is contained in:
Cloudburst
2021-06-01 14:25:24 +02:00
parent 5e67699be5
commit 1f6c9d6aa6
2 changed files with 0 additions and 36 deletions

View File

@@ -45,7 +45,6 @@ public class MeteorRejectsAddon extends MeteorAddon {
commands.add(new BookDupeCommand());
commands.add(new GiveCommand());
commands.add(new SaveSkinCommand());
commands.add(new SpectateCommand());
commands.add(new TerrainExport());
}

View File

@@ -1,35 +0,0 @@
package cloudburst.rejects.commands;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.minecraft.command.CommandSource;
import net.minecraft.entity.player.PlayerEntity;
import minegame159.meteorclient.systems.commands.arguments.PlayerArgumentType;
import minegame159.meteorclient.systems.commands.Command;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public class SpectateCommand extends Command {
public SpectateCommand() {
super("spectate", "Allows you to spectate nearby players", "spec");
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(ctx -> {
mc.setCameraEntity(mc.player);
return SINGLE_SUCCESS;
});
builder.then(argument("player", PlayerArgumentType.player()).executes(ctx -> {
PlayerEntity playerEntity = ctx.getArgument("player", PlayerEntity.class);
mc.setCameraEntity(playerEntity);
return SINGLE_SUCCESS;
}));
}
}