Skip to content

Commit

Permalink
Added win and lose messages
Browse files Browse the repository at this point in the history
  • Loading branch information
BomBardyGamer committed Dec 11, 2023
1 parent 496aaa6 commit 597a445
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repositories {
}

dependencies {
implementation("dev.emortal.minestom:game-sdk:3e4a79a")
implementation("dev.emortal.minestom:game-sdk:5fdd697")

implementation("net.kyori:adventure-text-minimessage:4.14.0")
implementation("dev.hollowcube:polar:1.3.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import dev.emortal.minestom.gamesdk.MinestomGameServer;
import dev.emortal.minestom.gamesdk.config.GameCreationInfo;
import dev.emortal.minestom.gamesdk.game.Game;
import dev.emortal.minestom.gamesdk.util.GameWinLoseMessages;
import dev.emortal.minestom.lazertag.gun.GunManager;
import dev.emortal.minestom.lazertag.map.LoadedMap;
import net.kyori.adventure.sound.Sound;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.title.Title;
import net.minestom.server.MinecraftServer;
Expand Down Expand Up @@ -105,12 +107,12 @@ public void victory() {

Title victoryTitle = Title.title(
MINI_MESSAGE.deserialize("<gradient:#ffc570:gold><bold>VICTORY!"),
Component.empty(),
Component.text(GameWinLoseMessages.randomVictory(), NamedTextColor.GRAY),
Title.Times.times(Duration.ZERO, Duration.ofSeconds(3), Duration.ofSeconds(3))
);
Title defeatTitle = Title.title(
MINI_MESSAGE.deserialize("<gradient:#ff474e:#ff0d0d><bold>DEFEAT!"),
Component.empty(),
Component.text(GameWinLoseMessages.randomDefeat(), NamedTextColor.GRAY),
Title.Times.times(Duration.ZERO, Duration.ofSeconds(3), Duration.ofSeconds(3))
);

Expand Down

0 comments on commit 597a445

Please sign in to comment.