Fixes...
Dieser Commit ist enthalten in:
Ursprung
de5a012d9e
Commit
77b066b387
@ -27,5 +27,6 @@ GAME_WAITING=
|
||||
SERVER_STOPPING=§cThe server stops in §e{0}s§8!
|
||||
KEY_NAME=§eKey
|
||||
KEY_FOUND=§a{0} §7found a key§8!
|
||||
GAME_TIE=§aThe game ended in a tie§8!
|
||||
|
||||
COMMAND_START=§aThe game will start soon§8!
|
@ -23,6 +23,7 @@ GAME_WIN=
|
||||
GAME_STARTING=§7Das Spiel startet in §e{0}s§8!
|
||||
GAME_WAITING=§7Warte auf weitere Spieler§8...
|
||||
SERVER_STOPPING=§cDer Server stoppt in §e{0}s§8!
|
||||
GAME_TIE=§7Keiner hat gewonnen§8!
|
||||
|
||||
KEY_NAME=§eSchlüssel
|
||||
KEY_FOUND=§a{0} §7hat einen Schlüssel gefunden§8!
|
||||
|
@ -34,7 +34,7 @@ import org.bukkit.plugin.java.annotation.plugin.Description;
|
||||
import org.bukkit.plugin.java.annotation.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.annotation.plugin.author.Author;
|
||||
|
||||
@Plugin(name = "TowerRun", version = "0.0.1")
|
||||
@Plugin(name = "TowerRun", version = "1.0.0")
|
||||
@Dependency(value = "SpigotCore")
|
||||
@Dependency(value = "WorldEdit")
|
||||
@Author(value = "YoyoNow")
|
||||
|
@ -74,6 +74,13 @@ public class TowerRunGame {
|
||||
PLAYERS_ESCAPED.remove(towerRunPlayer);
|
||||
}
|
||||
|
||||
public static void tie() {
|
||||
Bukkit.getOnlinePlayers().forEach(player -> player.setGameMode(GameMode.SPECTATOR));
|
||||
PLAYERS_ALIVE.clear();
|
||||
Bukkit.getOnlinePlayers().forEach(player -> player.sendTitle(TowerRun.getMessage().parse("GAME_TIE", player), "", 10, 70, 20));
|
||||
GameState.nextState();
|
||||
}
|
||||
|
||||
public static void win(TowerRunPlayer tPlayer) {
|
||||
Bukkit.getOnlinePlayers().forEach(player -> player.setGameMode(GameMode.SPECTATOR));
|
||||
PLAYERS_ALIVE.clear();
|
||||
|
@ -42,6 +42,10 @@ public class LastOutsideWincondition extends OutsideWincondition{
|
||||
@EventHandler
|
||||
public void onPlayerDeath(PlayerDeathEvent event) {
|
||||
if(TowerRunGame.PLAYERS_ALIVE.isEmpty()) {
|
||||
if(TowerRunGame.PLAYERS_ESCAPED.isEmpty()) {
|
||||
TowerRunGame.tie();
|
||||
return;
|
||||
}
|
||||
TowerRunGame.win(TowerRunGame.PLAYERS_ESCAPED.get(TowerRunGame.PLAYERS_ESCAPED.size() - 1));
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren