mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Add Pl3xMap support, Close #58
This commit is contained in:
1 parent
e28ceb20ff
commit
c89d263505
10 files changed
+237
-76
No files matched your search
@@ -28,7 +28,8 @@ public class TpCommand extends CommandBase {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
try {
|
||||
switch (args.length) {
|
||||
default: case 0:
|
||||
default:
|
||||
case 0:
|
||||
MessageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
|
||||
return;
|
||||
case 1:
|
||||
@@ -78,6 +79,38 @@ public class TpCommand extends CommandBase {
|
||||
} else {
|
||||
MessageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
|
||||
}
|
||||
return;
|
||||
case 6:
|
||||
try {
|
||||
double x = Double.parseDouble(args[0]);
|
||||
double y = Double.parseDouble(args[1]);
|
||||
double z = Double.parseDouble(args[2]);
|
||||
String worldName = args[3];
|
||||
float yaw = Float.parseFloat(args[4]);
|
||||
float pitch = Float.parseFloat(args[5]);
|
||||
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, yaw, pitch, HuskHomes.getSettings().getServerID());
|
||||
TeleportManager.teleportPlayer(p, teleportationPoint, connection);
|
||||
} catch (NumberFormatException e) {
|
||||
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <yaw> <pitch>");
|
||||
}
|
||||
case 7:
|
||||
if (HuskHomes.getSettings().doBungee()) {
|
||||
try {
|
||||
double x = Double.parseDouble(args[0]);
|
||||
double y = Double.parseDouble(args[1]);
|
||||
double z = Double.parseDouble(args[2]);
|
||||
String worldName = args[3];
|
||||
String serverName = args[4];
|
||||
float yaw = Float.parseFloat(args[5]);
|
||||
float pitch = Float.parseFloat(args[6]);
|
||||
TeleportationPoint teleportationPoint = new TeleportationPoint(worldName, x, y, z, yaw, pitch, serverName);
|
||||
TeleportManager.teleportPlayer(p, teleportationPoint, connection);
|
||||
} catch (NumberFormatException e) {
|
||||
MessageManager.sendMessage(p, "error_invalid_syntax", "/tp <x> <y> <z> <world> <server> <yaw> <pitch>");
|
||||
}
|
||||
} else {
|
||||
MessageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "An SQL exception occurred while using /tp", e);
|
||||
|
||||
Reference in new issue
Block a user