Intercept UnsupportedOperationException in getWorldConfig.

TemporaryPlayer issue: https://github.com/NoCheatPlus/Issues/issues/335
This commit is contained in:
asofold 2016-12-19 00:10:42 +01:00
parent 0ea8d379d0
commit dcfdec79e2

View File

@ -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());
}