Fixed Issue #21 Replace Falsche Verwendung
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
ba8f3e224a
Commit
328c4c14f2
@ -137,24 +137,26 @@ public class FightTeam {
|
|||||||
|
|
||||||
FightTeam fightTeam = Fight.getPlayerTeam(this.leader.getPlayer());
|
FightTeam fightTeam = Fight.getPlayerTeam(this.leader.getPlayer());
|
||||||
|
|
||||||
|
FightSystem instance = FightSystem.getPlugin();
|
||||||
|
|
||||||
if(this.ready == true) {
|
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());
|
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!");
|
broadcast(FightSystem.PREFIX + "§aEuer Team ist nun bereit!");
|
||||||
if(Fight.getOpposite(fightTeam).isReady()) {
|
if(Fight.getOpposite(fightTeam).isReady()) {
|
||||||
FightSystem.getPlugin().setPreRunningState();
|
instance.setPreRunningState();
|
||||||
int time = FightSystem.getPlugin().getFileManager().getIntegerFromConfig("Times.PreFightDuration");
|
int time = instance.getFileManager().getIntegerFromConfig("Times.PreFightDuration");
|
||||||
Countdown countdown = new Countdown(time, new FinishPreRunning());
|
Countdown countdown = new Countdown(time, new FinishPreRunning());
|
||||||
countdown.startTimer(FightSystem.getPlugin());
|
countdown.startTimer(instance);
|
||||||
for(FightPlayer allFightPlayers : fightTeam.getPlayers()) {
|
for(FightPlayer allFightPlayers : fightTeam.getPlayers()) {
|
||||||
allFightPlayers.getPlayer().getInventory().clear();
|
allFightPlayers.getPlayer().getInventory().clear();
|
||||||
}
|
}
|
||||||
for(FightPlayer allFightPlayers : Fight.getOpposite(fightTeam).getPlayers()) {
|
for(FightPlayer allFightPlayers : Fight.getOpposite(fightTeam).getPlayers()) {
|
||||||
allFightPlayers.getPlayer().getInventory().clear();
|
allFightPlayers.getPlayer().getInventory().clear();
|
||||||
}
|
}
|
||||||
FightSystem.getPlugin().getFightManager().teleportAllToFightSpawn();
|
instance.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(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(), FightSystem.getPlugin().getTeam2cornerX(), FightSystem.getPlugin().getTeam2cornerY(), FightSystem.getPlugin().getTeam2cornerZ(), FightSystem.getPlugin().getSchemsizeX(), FightSystem.getPlugin().getSchemsizeY(), FightSystem.getPlugin().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 {
|
} else {
|
||||||
fightTeam.getLeader().getPlayer().getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short) 10).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§cNicht bereit").build());
|
fightTeam.getLeader().getPlayer().getInventory().setItem(3, new ItemBuilder(Material.INK_SACK, (short) 10).removeAllAtributs().addEnchantment(Enchantment.DURABILITY, 1).setDisplayName("§cNicht bereit").build());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren