Minecraftserver Java Plugin IntelliJ IDEA
Archiviert a year ago
K
Kalle_the_Oldman
Verified
Hi all, i have make a plugin .This works fine with 1.20.4 Serverversion. in 1.21 at beginning it does not work. I change some and it work90% .so the Problem ist with location. I Read location from mysql Database. in the actual world i can teleport fine . If i want to teleport in another World (it is in the root Folder from Minecraftserver. Such as the original World. Code:
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + "Du musst ein Spieler sein!!");
return false;
}//SpielerAbfrage ende
Player player = (Player) sender;
if (args.length == 1) {
if (args[0].equalsIgnoreCase("tele")) {
player.sendMessage(ChatColor.GREEN + player.getName() + " Festhalten es geht los.");
String testworld = "NeueWelt";
double x1 = 200;
double y1 = 200;
double z1 = 200;
Location location = new Location(Bukkit.getWorld(testworld), x1, y1, z1);
((Player) sender).teleport(location);
}
}
What can be the problem. in Version 1.20.4 this works fine. It must be a change in new Java/MinecraftAPi .
Can any body help me please. In google i search few times. i dont know the right search word
Thank all
