aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
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) {