Archiviert
13
0
Dieser Commit ist enthalten in:
Chaoscaot 2023-08-16 23:04:53 +02:00
Ursprung 88ca2ec7b5
Commit bb3142078f
Signiert von: Chaoscaot
GPG-Schlüssel-ID: BDF8FADD7D5EDB7A
3 geänderte Dateien mit 8 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -63,7 +63,6 @@ public class LobbyCountdown extends Countdown {
@Override
void timerReset() {
Bukkit.getOnlinePlayers().forEach(player -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§cEs wird noch auf Spieler gewartet...")));
TowerRun.getMessage().broadcastActionbar("GAME_WAITING");
}
}

Datei anzeigen

@ -23,10 +23,7 @@ import de.steamwar.towerrun.TowerRun;
import de.steamwar.towerrun.config.WorldConfig;
import de.steamwar.towerrun.state.GameState;
import de.steamwar.towerrun.state.GameStates;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.*;
import org.bukkit.util.Vector;
import java.util.ArrayList;
@ -81,6 +78,10 @@ public class TowerRunGame {
tPlayer.player().teleport(WorldConfig.SPAWN);
tPlayer.player().setGameMode(GameMode.SPECTATOR);
TowerRun.getMessage().broadcast("GAME_WIN", tPlayer.player().getName());
Bukkit.getOnlinePlayers().forEach(player -> {
player.sendTitle(TowerRun.getMessage().parse("GAME_WIN", player, tPlayer.player().getName()), "", 10, 70, 20);
player.playSound(player.getLocation(), Sound.ENTITY_ENDER_DRAGON_DEATH, 1, 1);
});
GameState.nextState();
}
}

Datei anzeigen

@ -22,7 +22,6 @@ package de.steamwar.towerrun.winconditions;
import de.steamwar.towerrun.config.WorldConfig;
import de.steamwar.towerrun.game.TowerRunGame;
import de.steamwar.towerrun.game.TowerRunPlayer;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerMoveEvent;
@ -31,6 +30,8 @@ import java.util.Arrays;
public abstract class OutsideWincondition extends WinCondition {
private static final double BASE_GRAVITY = -0.0784000015258789;
protected OutsideWincondition(String name) {
super(name);
}
@ -51,7 +52,7 @@ public abstract class OutsideWincondition extends WinCondition {
return;
}
if (event.getPlayer().getVelocity().getY() != -0.0784000015258789) {
if (event.getPlayer().getVelocity().getY() != BASE_GRAVITY) {
return;
}