blob: a48955c3f9309e429544ee1797ddea1f0e099464 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package net.tylermurphy.Minecraft.Command.Commands;
import java.util.List;
import org.joml.Vector3f;
import net.tylermurphy.Minecraft.Command.ICommand;
import net.tylermurphy.Minecraft.Scene.World;
public class Teleport implements ICommand {
public void invoke(List<String> args) {
if(args.size() < 3) return;
float x,y,z;
try {
x = Float.parseFloat(args.get(0));
y = Float.parseFloat(args.get(1));
z = Float.parseFloat(args.get(2));
} catch (Exception e) {
return;
}
World.player.getTransform().setGlobalPosition(new Vector3f(x,y,z));
}
public String getInvoke() {
return "tp";
}
}
|