SteamWar/FightSystem
Archiviert
13
1

Fixed Issue #21 Replace Falsche Verwendung

Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-02-19 21:32:04 +01:00
Ursprung ba8f3e224a
Commit 328c4c14f2

Datei anzeigen

@ -137,24 +137,26 @@ public class FightTeam {
FightTeam fightTeam = Fight.getPlayerTeam(this.leader.getPlayer());
FightSystem instance = FightSystem.getPlugin();
if(this.ready == true) {
fightTeam.getLeader().getPlayer().getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short) 8).removeAllAtributs().addEnchantment(Enchantment.DURABILITY,1 ).setDisplayName("§aBereit").build());
broadcast(FightSystem.PREFIX + "§aEuer Team ist nun bereit!");
if(Fight.getOpposite(fightTeam).isReady()) {
FightSystem.getPlugin().setPreRunningState();
int time = FightSystem.getPlugin().getFileManager().getIntegerFromConfig("Times.PreFightDuration");
instance.setPreRunningState();
int time = instance.getFileManager().getIntegerFromConfig("Times.PreFightDuration");
Countdown countdown = new Countdown(time, new FinishPreRunning());
countdown.startTimer(FightSystem.getPlugin());
countdown.startTimer(instance);
for(FightPlayer allFightPlayers : fightTeam.getPlayers()) {
allFightPlayers.getPlayer().getInventory().clear();
}
for(FightPlayer allFightPlayers : Fight.getOpposite(fightTeam).getPlayers()) {
allFightPlayers.getPlayer().getInventory().clear();
}
FightSystem.getPlugin().getFightManager().teleportAllToFightSpawn();
WorldEdit.replace(fightTeam.getLeader().getPlayer(), FightSystem.getPlugin().getTeam1cornerX(), FightSystem.getPlugin().getTeam1cornerY(), FightSystem.getPlugin().getTeam1cornerZ(), FightSystem.getPlugin().getSchemsizeX(), FightSystem.getPlugin().getSchemsizeY(), FightSystem.getPlugin().getSchemsizeZ());
WorldEdit.replace(Fight.getOpposite(fightTeam).getLeader().getPlayer(), FightSystem.getPlugin().getTeam2cornerX(), FightSystem.getPlugin().getTeam2cornerY(), FightSystem.getPlugin().getTeam2cornerZ(), FightSystem.getPlugin().getSchemsizeX(), FightSystem.getPlugin().getSchemsizeY(), FightSystem.getPlugin().getSchemsizeZ());
instance.getFightManager().teleportAllToFightSpawn();
WorldEdit.replace(fightTeam.getLeader().getPlayer(), instance.getTeam1cornerX(), instance.getTeam1cornerY(), instance.getTeam1cornerZ(), instance.getTeam1cornerX() + instance.getSchemsizeX(), instance.getTeam1cornerY() + instance.getSchemsizeY(), instance.getTeam1cornerZ() + instance.getSchemsizeZ());
WorldEdit.replace(Fight.getOpposite(fightTeam).getLeader().getPlayer(), instance.getTeam2cornerX(), instance.getTeam2cornerY(), instance.getTeam2cornerZ(), instance.getTeam2cornerX() + instance.getSchemsizeX(), instance.getTeam2cornerY() + instance.getSchemsizeY(), instance.getTeam2cornerZ() + instance.getSchemsizeZ());
}
} else {
fightTeam.getLeader().getPlayer().getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short) 10).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§cNicht bereit").build());