From 1b3d609503868d0c3a5514fb2f796bb2e84bcb15 Mon Sep 17 00:00:00 2001 From: Callum Seabrook Date: Sun, 10 Dec 2023 13:22:05 +0000 Subject: [PATCH] Added random win and lose messages --- build.gradle.kts | 2 +- .../dev/emortal/minestom/blocksumo/game/BlockSumoGame.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3642f99..72e02bb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ repositories { } dependencies { - implementation("dev.emortal.minestom:game-sdk:3e4a79a") + implementation("dev.emortal.minestom:game-sdk:7b8e6b6") implementation("dev.emortal:rayfast:e6ebf1f") implementation("com.github.emortaldev:Particable:f7212f39fb") diff --git a/src/main/java/dev/emortal/minestom/blocksumo/game/BlockSumoGame.java b/src/main/java/dev/emortal/minestom/blocksumo/game/BlockSumoGame.java index a66194c..2d87b4f 100644 --- a/src/main/java/dev/emortal/minestom/blocksumo/game/BlockSumoGame.java +++ b/src/main/java/dev/emortal/minestom/blocksumo/game/BlockSumoGame.java @@ -11,6 +11,7 @@ import dev.emortal.minestom.blocksumo.team.TeamColor; import dev.emortal.minestom.gamesdk.config.GameCreationInfo; import dev.emortal.minestom.gamesdk.game.Game; +import dev.emortal.minestom.gamesdk.util.GameWinLoseMessages; import net.kyori.adventure.key.Key; import net.kyori.adventure.sound.Sound; import net.kyori.adventure.text.Component; @@ -186,12 +187,12 @@ public void victory(@NotNull Set winners) { Title victoryTitle = Title.title( MiniMessage.miniMessage().deserialize("VICTORY!"), - Component.empty(), + Component.text(GameWinLoseMessages.VICTORY.random()), Title.Times.times(Duration.ZERO, Duration.ofSeconds(2), Duration.ofSeconds(4)) ); Title defeatTitle = Title.title( MiniMessage.miniMessage().deserialize("DEFEAT!"), - Component.empty(), + Component.text(GameWinLoseMessages.DEFEAT.random()), Title.Times.times(Duration.ZERO, Duration.ofSeconds(2), Duration.ofSeconds(4)) );