From dcfdec79e26a4e194f071532905ddeae0837fa57 Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 19 Dec 2016 00:10:42 +0100 Subject: [PATCH] Intercept UnsupportedOperationException in getWorldConfig. TemporaryPlayer issue: https://github.com/NoCheatPlus/Issues/issues/335 --- .../fr/neatmonster/nocheatplus/checks/net/NetStatic.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/NetStatic.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/NetStatic.java index de824e20..e51ed967 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/NetStatic.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/NetStatic.java @@ -176,7 +176,11 @@ public class NetStatic { * @return */ public static NetConfig getWorldConfig(Player player, NetConfigCache configCache, NetDataFactory dataFactory) { - final World world = player.getWorld(); + World world = null; + try { + world = player.getWorld(); + } + catch (UnsupportedOperationException e) {} return configCache.getConfig(world == null ? dataFactory.getData(player).currentWorldName : world.getName()); }