From e1fc5525ec0690aa01dfd20fcc2bbcbc421db6b4 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 23 Dec 2022 19:17:37 +0100 Subject: [PATCH] Fix TeleportCommand --- .../bausystem/features/util/TeleportCommand.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java index 2b372c56..e778ba78 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java @@ -22,9 +22,9 @@ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; +import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent; -import org.bukkit.Location; import java.util.Random; @@ -54,4 +54,13 @@ public class TeleportCommand extends SWCommand { l.setZ(z + 0.5); p.teleport(l, PlayerTeleportEvent.TeleportCause.COMMAND); } + + @Register + public void locationCommand(Player p, double x, double y, double z) { + Location l = p.getLocation(); + l.setX(x); + l.setY(y); + l.setZ(z); + p.teleport(l, PlayerTeleportEvent.TeleportCause.COMMAND); + } } \ No newline at end of file