bug fixes
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
872f57cff4
Commit
d22ab0669e
@ -1,7 +1,7 @@
|
|||||||
package me.yaruma.fightsystem;
|
package me.yaruma.fightsystem;
|
||||||
|
|
||||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||||
import de.diamant.hunjy.CoinSystem.CoinSystem;
|
import de.warking.hunjy.CoinSystem.CoinSystem;
|
||||||
import me.yaruma.fightsystem.commands.AkCommand;
|
import me.yaruma.fightsystem.commands.AkCommand;
|
||||||
import me.yaruma.fightsystem.fight.*;
|
import me.yaruma.fightsystem.fight.*;
|
||||||
import me.yaruma.fightsystem.kit.KitManager;
|
import me.yaruma.fightsystem.kit.KitManager;
|
||||||
@ -172,8 +172,6 @@ public class FightSystem extends JavaPlugin {
|
|||||||
Countdown countdown = new Countdown(setupDuration, new FinishNoPlayersOnline());
|
Countdown countdown = new Countdown(setupDuration, new FinishNoPlayersOnline());
|
||||||
countdown.startTimer(getPlugin());
|
countdown.startTimer(getPlugin());
|
||||||
|
|
||||||
world.setSpawnLocation(getSpecSpawnLoc());
|
|
||||||
|
|
||||||
System.out.println(PREFIX + "§aPlugin gestartet!");
|
System.out.println(PREFIX + "§aPlugin gestartet!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,9 +271,14 @@ public class FightSystem extends JavaPlugin {
|
|||||||
for(FightPlayer allFightPlayers : Fight.getRedTeam().getPlayers()) {
|
for(FightPlayer allFightPlayers : Fight.getRedTeam().getPlayers()) {
|
||||||
allFightPlayers.getPlayer().getInventory().clear();
|
allFightPlayers.getPlayer().getInventory().clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
getFightManager().teleportAllToFightSpawn();
|
getFightManager().teleportAllToFightSpawn();
|
||||||
WorldEdit.replace(Fight.getBlueTeam().getLeader().getPlayer(), team1cornerX, team1cornerY, team1cornerZ, team1cornerX + schemsizeX, team1cornerY + schemsizeY, team1cornerZ + schemsizeZ);
|
WorldEdit.replace(Fight.getBlueTeam().getLeader().getPlayer(), team1cornerX, team1cornerY, team1cornerZ, team1cornerX + schemsizeX, team1cornerY + schemsizeY, team1cornerZ + schemsizeZ);
|
||||||
|
|
||||||
WorldEdit.replace(Fight.getRedTeam().getLeader().getPlayer(), team2cornerX, team2cornerY, team2cornerZ, team2cornerX + schemsizeX, team2cornerY + schemsizeY, team2cornerZ + schemsizeZ);
|
WorldEdit.replace(Fight.getRedTeam().getLeader().getPlayer(), team2cornerX, team2cornerY, team2cornerZ, team2cornerX + schemsizeX, team2cornerY + schemsizeY, team2cornerZ + schemsizeZ);
|
||||||
|
Bukkit.broadcastMessage(" ");
|
||||||
|
Bukkit.broadcastMessage("§aDer Fight beginnt!");
|
||||||
|
Bukkit.broadcastMessage(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setAllPlayersGM(GameMode gm) {
|
private void setAllPlayersGM(GameMode gm) {
|
||||||
@ -297,10 +300,9 @@ public class FightSystem extends JavaPlugin {
|
|||||||
|
|
||||||
setAllPlayersGM(GameMode.SURVIVAL);
|
setAllPlayersGM(GameMode.SURVIVAL);
|
||||||
|
|
||||||
if(fileManager.getBooleanFromConfig("WinConditions.Timeout")) {
|
WinconditionTimeout.timeout();
|
||||||
WinconditionTimeout.timeout();
|
WinconditionEntern.entern();
|
||||||
WinconditionEntern.entern();
|
|
||||||
}
|
|
||||||
Bukkit.broadcastMessage("§aArena freigegeben!");
|
Bukkit.broadcastMessage("§aArena freigegeben!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,13 +50,18 @@ public class Countdown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void cancelTimer() {
|
public void cancelTimer() {
|
||||||
Bukkit.getScheduler().cancelTask(this.taskID);
|
|
||||||
countdowns.remove(this);
|
try {
|
||||||
|
Bukkit.getScheduler().cancelTask(this.taskID);
|
||||||
|
countdowns.remove(this);
|
||||||
|
} catch (AssertionError ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void cancelAllTimers() {
|
public static void cancelAllTimers() {
|
||||||
for(int i = countdowns.size() - 1; i >= 0; i--) {
|
while (!countdowns.isEmpty()) {
|
||||||
countdowns.get(i).cancelTimer();
|
countdowns.get(0).cancelTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren