Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.tnt_block_unkown.tntmod.commands.list;
- import de.tnt_block_unkown.tntmod.commands.Command;
- import de.tnt_block_unkown.tntmod.main.TNTMod;
- import net.minecraft.network.play.client.C03PacketPlayer;
- public class Teleport extends Command {
- public Teleport() {
- super("teleport", "#teleport <x> <y> <z>, teleportiert dich zu einer bestimmten Position!");
- }
- @Override
- public void onCommand(String[] args) {
- try {
- Double x = Double.parseDouble(args[0]);
- Double y = Double.parseDouble(args[1]);
- Double z = Double.parseDouble(args[2]);
- for (int i = 0; i < 4; i++) {
- mc.thePlayer.setPosition(x, y, z);
- mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, false));
- mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, true));
- }
- } catch (Exception e) {
- TNTMod.addMessage("#teleport <x> <y> <z>");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement