Delete src/main/java/de/teleportsuite/commands/TpPosCommand.java via Git Manager GUI

This commit is contained in:
2026-05-23 18:08:10 +00:00
parent 57d0ad1a6c
commit 0e5bc86455

View File

@@ -1,22 +0,0 @@
package de.teleportsuite.commands;
import de.teleportsuite.TeleportSuite;
import de.teleportsuite.models.TeleportLocation;
import org.bukkit.command.*;
import org.bukkit.entity.Player;
public class TpPosCommand implements CommandExecutor {
private final TeleportSuite plugin;
public TpPosCommand(TeleportSuite p) { this.plugin = p; }
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)) { sender.sendMessage("§cNur für Spieler!"); return true; }
Player p = (Player) sender;
if (!p.hasPermission("teleportsuite.tppos")) { p.sendMessage(plugin.getConfigManager().getMessage("no-permission")); return true; }
if (args.length < 3) { p.sendMessage("§cVerwendung: /tppos <x> <y> <z> [world]"); return true; }
try {
double x = Double.parseDouble(args[0]), y = Double.parseDouble(args[1]), z = Double.parseDouble(args[2]);
String world = args.length > 3 ? args[3] : p.getWorld().getName();
plugin.getTeleportManager().teleport(p, new TeleportLocation(world, x, y, z, p.getLocation().getYaw(), p.getLocation().getPitch(), plugin.getConfigManager().getServerName()));
} catch (NumberFormatException e) { p.sendMessage("§cUngültige Koordinaten!"); }
return true;
}
}