From 635d235a87ea8bff6bec313aced0fc96f87dd525 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 21 Nov 2022 07:29:35 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9EBauSystem=5FMain/src/de/steamwar/bausy?= =?UTF-8?q?stem/features/util/TeleportCommand.java=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bausystem/features/util/TeleportCommand.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 9294eb20..2b372c56 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/TeleportCommand.java @@ -24,6 +24,7 @@ import de.steamwar.command.SWCommand; import de.steamwar.linkage.Linked; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTeleportEvent; +import org.bukkit.Location; import java.util.Random; @@ -44,4 +45,13 @@ public class TeleportCommand extends SWCommand { } p.teleport(target, PlayerTeleportEvent.TeleportCause.COMMAND); } + + @Register + public void locationCommand(Player p, int x, int y, int z) { + Location l = p.getLocation(); + l.setX(x + 0.5); + l.setY(y); + l.setZ(z + 0.5); + p.teleport(l, PlayerTeleportEvent.TeleportCause.COMMAND); + } } \ No newline at end of file