facingEnemy #160
@ -251,23 +251,25 @@ public class Config {
|
|||||||
|
|
||||||
World world = Bukkit.getWorlds().get(0);
|
World world = Bukkit.getWorlds().get(0);
|
||||||
double yaw = Math.toDegrees(Math.atan2(TeamBluetoReddistanceZ, TeamBluetoReddistanceX));
|
double yaw = Math.toDegrees(Math.atan2(TeamBluetoReddistanceZ, TeamBluetoReddistanceX));
|
||||||
double pitch = Math.toDegrees(Math.atan2(Math.sqrt(TeamBluetoReddistanceZ * TeamBluetoReddistanceZ + TeamBluetoReddistanceX * TeamBluetoReddistanceX), TeamBluetoReddistanceY) + Math.PI);
|
double pitch = Math.toDegrees(Math.atan2(Math.sqrt(TeamBluetoReddistanceZ * TeamBluetoReddistanceZ + TeamBluetoReddistanceX * TeamBluetoReddistanceX), TeamBluetoReddistanceY));
|
||||||
double yawInverted = ((yaw + 90 + 180) * 180) / 180;
|
double yawInverted = ((yaw + 180) * 180) / 180;
|
||||||
double pitchInverted = ((90 - pitch) * 180) / 180;
|
double pitchInverted = ((90 - pitch) * 180) / 180;
|
||||||
|
|
||||||
TeamBlueSpawn = new Location(world,
|
TeamBlueSpawn = new Location(world,
|
||||||
TeamBluePasteX + 0.5 + teamBlueSpawnOffsetX,
|
TeamBluePasteX + 0.5 + teamBlueSpawnOffsetX,
|
||||||
TeamBlueCornerY + 0.5 + teamBlueSpawnOffsetY,
|
TeamBlueCornerY + 0.5 + teamBlueSpawnOffsetY,
|
||||||
TeamBluePasteZ + 0.5 + teamBlueSpawnOffsetZ);
|
TeamBluePasteZ + 0.5 + teamBlueSpawnOffsetZ);
|
||||||
TeamBlueSpawn.setYaw((float)yaw);
|
|
||||||
TeamBlueSpawn.setPitch((float)pitch);
|
|
||||||
|
|
||||||
TeamRedSpawn = new Location(world,
|
TeamRedSpawn = new Location(world,
|
||||||
TeamRedPasteX + 0.5 - teamBlueSpawnOffsetX,
|
TeamRedPasteX + 0.5 - teamBlueSpawnOffsetX,
|
||||||
TeamRedCornerY + 0.5 + teamBlueSpawnOffsetY,
|
TeamRedCornerY + 0.5 + teamBlueSpawnOffsetY,
|
||||||
TeamRedPasteZ + 0.5 - teamBlueSpawnOffsetZ);
|
TeamRedPasteZ + 0.5 - teamBlueSpawnOffsetZ);
|
||||||
TeamRedSpawn.setYaw((float)yawInverted);
|
|
||||||
TeamRedSpawn.setPitch((float)pitchInverted);
|
TeamBlueSpawn.setYaw((float)yawInverted);
|
||||||
|
TeamBlueSpawn.setPitch((float)pitchInverted);
|
||||||
|
|
||||||
|
TeamRedSpawn.setYaw((float)yaw);
|
||||||
|
TeamRedSpawn.setPitch((float)pitch);
|
||||||
|
|
||||||
SpecSpawn = new Location(world,
|
SpecSpawn = new Location(world,
|
||||||
TeamBluePasteX + TeamBluetoReddistanceX/2.0,
|
TeamBluePasteX + TeamBluetoReddistanceX/2.0,
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren