SteamWar/FightSystem
Archiviert
13
1

Merge branch 'SpecSpawnPos' into 'master'

Added Spectator Spawn Position

See merge request Yaruma3341/fightsystem!2
Dieser Commit ist enthalten in:
Yaruma3341 2019-02-15 18:04:34 +01:00
Commit 068f089c9e
2 geänderte Dateien mit 20 neuen und 21 gelöschten Zeilen

Datei anzeigen

@ -31,6 +31,7 @@ public class FightSystem extends JavaPlugin {
public Location Team1SpawnLoc = null; public Location Team1SpawnLoc = null;
public Location Team2SpawnLoc = null; public Location Team2SpawnLoc = null;
public Location SpecSpawnLoc = null;
public Location Team1PasteLoc = null; public Location Team1PasteLoc = null;
public Location Team2PasteLoc = null; public Location Team2PasteLoc = null;
@ -169,6 +170,10 @@ public class FightSystem extends JavaPlugin {
return Team2SpawnLoc; return Team2SpawnLoc;
} }
public Location getSpecSpawnLoc() {
return SpecSpawnLoc;
}
public Location getTeam1PasteLoc() { public Location getTeam1PasteLoc() {
return Team1PasteLoc; return Team1PasteLoc;
} }
@ -233,6 +238,10 @@ public class FightSystem extends JavaPlugin {
Team2PasteLoc = team2PasteLoc; Team2PasteLoc = team2PasteLoc;
} }
public void setSpecSpawnLoc(Location specSpawnLoc) {
SpecSpawnLoc = specSpawnLoc;
}
public void setArenaMinX(int arenaMinX) { public void setArenaMinX(int arenaMinX) {
ArenaMinX = arenaMinX; ArenaMinX = arenaMinX;
} }

Datei anzeigen

@ -54,30 +54,20 @@ public class Coordinates {
int Team2centerY = Team1centerY + Team1toTeam2distanceY; int Team2centerY = Team1centerY + Team1toTeam2distanceY;
int Team2centerZ = Team1centerZ + Team1toTeam2distanceZ; int Team2centerZ = Team1centerZ + Team1toTeam2distanceZ;
World world = Bukkit.getWorld(fileManager.getStringFromConfig("Arena.WorldName")); World world = Bukkit.getWorld(fileManager.getStringFromConfig("Arena.WorldName"));
FightSystem.getPlugin().setTeam1SpawnLoc(new Location(world, Team1centerX, Team1centerY + SchemsizeY, Team1centerZ));
FightSystem.getPlugin().setTeam2SpawnLoc(new Location(world, Team1centerX, Team1centerY + SchemsizeY, Team1centerZ));
FightSystem.getPlugin().setSpecSpawnLoc(new Location(world, Team1centerX + Team1toTeam2distanceX/2,
Team1centerY + Team1toTeam2distanceY/2 + SchemsizeY/2,
Team1centerZ + Team1toTeam2distanceZ/2));
FightSystem.getPlugin().setTeam1PasteLoc(new Location(world, Team1centerX, Team1centerY, Team1centerZ));
FightSystem.getPlugin().setTeam2PasteLoc(new Location(world, Team2centerX, Team2centerY, Team2centerZ));
Location Team1SpawnLoc = new Location(world, Team1centerX, Team1centerY + SchemsizeY, Team1centerZ); FightSystem.getPlugin().setArenaMinX(Team1cornerX - Schem2BorderX);
Location Team2SpawnLoc = new Location(world, Team1centerX, Team1centerY + SchemsizeY, Team1centerZ); FightSystem.getPlugin().setArenaMaxX(Team1cornerX + Team1toTeam2distanceX + Schem2BorderX);
Location Team1PasteLoc = new Location(world, Team1centerX, Team1centerY, Team1centerZ); FightSystem.getPlugin().setArenaMinZ(Team1cornerZ - Schem2BorderZ);
Location Team2PasteLoc = new Location(world, Team2centerX, Team2centerY, Team2centerZ); FightSystem.getPlugin().setArenaMaxZ(Team1cornerZ + Team1toTeam2distanceZ + Schem2BorderZ);
int ArenaMinX = Team1cornerX - Schem2BorderX;
int ArenaMaxX = Team1cornerX + Team1toTeam2distanceX + Schem2BorderX;
int ArenaMinZ = Team1cornerZ - Schem2BorderZ;
int ArenaMaxZ = Team1cornerZ + Team1toTeam2distanceZ + Schem2BorderZ;
FightSystem.getPlugin().setTeam1SpawnLoc(Team1SpawnLoc);
FightSystem.getPlugin().setTeam2SpawnLoc(Team2SpawnLoc);
FightSystem.getPlugin().setTeam1PasteLoc(Team1PasteLoc);
FightSystem.getPlugin().setTeam2PasteLoc(Team2PasteLoc);
FightSystem.getPlugin().setArenaMinX(ArenaMinX);
FightSystem.getPlugin().setArenaMaxX(ArenaMaxX);
FightSystem.getPlugin().setArenaMinZ(ArenaMinZ);
FightSystem.getPlugin().setArenaMaxZ(ArenaMaxZ);
} }