aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authoranhgelus <anhgelus.morhtuuzh@proton.me>2024-08-22 20:15:32 +0000
committeranhgelus <anhgelus.morhtuuzh@proton.me>2024-08-22 20:15:32 +0000
commit828a6da4afb6df396dee3e125451a5953382e71c (patch)
tree22395ec7b980f311216466da55e277e152fa8f2e /src/main
parenta2d825e377bd9e23fd58e4d6a40e24a8a6dd3b3e (diff)
feat(mole): moles' list not properly displayed
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/world/anhgelus/molehunt/Game.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/world/anhgelus/molehunt/Game.java b/src/main/java/world/anhgelus/molehunt/Game.java
index d0f1f6f..a32bd23 100644
--- a/src/main/java/world/anhgelus/molehunt/Game.java
+++ b/src/main/java/world/anhgelus/molehunt/Game.java
@@ -7,6 +7,7 @@ import net.minecraft.network.packet.s2c.play.TitleS2CPacket;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
+import net.minecraft.text.TextContent;
import net.minecraft.world.GameMode;
import net.minecraft.world.GameRules;
import world.anhgelus.molehunt.utils.TimeUtils;
@@ -153,7 +154,11 @@ public class Game {
}
public String getMolesAsString() {
- return moles.stream().map(ServerPlayerEntity::getDisplayName).filter(Objects::nonNull).map(Text::toString).collect(Collectors.joining(", "));
+ return moles.stream()
+ .map(ServerPlayerEntity::getDisplayName)
+ .filter(Objects::nonNull)
+ .map(Text::getString)
+ .collect(Collectors.joining(", "));
}
public boolean isAMole(ServerPlayerEntity player) {