From b60b785dcd4170663ec99b27113919243f3ae437 Mon Sep 17 00:00:00 2001 From: TheMode Date: Thu, 26 Aug 2021 17:59:51 +0200 Subject: [PATCH] Fix unhandled exception Signed-off-by: TheMode --- src/main/java/net/minestom/server/entity/Player.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/entity/Player.java b/src/main/java/net/minestom/server/entity/Player.java index 038acc530..246c0618d 100644 --- a/src/main/java/net/minestom/server/entity/Player.java +++ b/src/main/java/net/minestom/server/entity/Player.java @@ -1196,7 +1196,11 @@ public class Player extends LivingEntity implements CommandSender, Localizable, // Cannot load chunk (auto load is not enabled) return; } - chunk.addViewer(this); + try { + chunk.addViewer(this); + } catch (Exception e) { + MinecraftServer.getExceptionManager().handleException(e); + } }); }); }