Ja Hallo Liebes Forum,
Wieso wird hier(World world2 = this.getConfig().getString("S4League.world"); ), besser gefragt wie kann ich
hier(Location loc = new Location(world2, posX, posY, posZ, yaw, pitch)
nutzen
Code:
@Override
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
{
if(cmd.getName().equalsIgnoreCase("s4 join"))
{
Player pl = null;
//var
World world2 = this.getConfig().getString("S4League.world");
//var
try {
int posX = 0;
int posY = 0;
int posZ = 0;
float yaw = 0;
float pitch = 0;
World world = pl.getWorld();
Location loc = new Location(world2, posX, posY, posZ, yaw, pitch);
pl.teleport(loc);
} catch (NumberFormatException ex) {
sender.sendMessage("$3 Fehler beim Joinen der Arena");
}
}
return true;
}
//CONFIG------
private void loadconfig(){
String t1s = "S4League.world";
this.getConfig().addDefault(t1s, "world");
}
Wieso wird hier(World world2 = this.getConfig().getString("S4League.world"); ), besser gefragt wie kann ich
hier(Location loc = new Location(world2, posX, posY, posZ, yaw, pitch)