From 85164b7a7355057e26f7fb98303c2ddadd3384ee Mon Sep 17 00:00:00 2001 From: noil Date: Wed, 20 Nov 2019 22:27:31 -0500 Subject: [PATCH] fix for wallhack spamming null pointer error --- .../seppuku/impl/module/render/WallHackModule.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/render/WallHackModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/render/WallHackModule.java index 63139d6..d4d6ff8 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/render/WallHackModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/render/WallHackModule.java @@ -136,7 +136,11 @@ public final class WallHackModule extends Module { if (e instanceof EntityPlayer) { final EntityPlayer player = (EntityPlayer) e; if (this.ping.getBoolean()) { - final int responseTime = (int) MathUtil.clamp(mc.getConnection().getPlayerInfo(player.getUniqueID()).getResponseTime(), 0, 300); + int responseTime = -1; + try { + responseTime = (int) MathUtil.clamp(mc.getConnection().getPlayerInfo(player.getUniqueID()).getResponseTime(), 0, 300); + } catch (NullPointerException np) { + } pingFormatted = responseTime + "ms"; float startX = -mc.fontRenderer.getStringWidth(pingFormatted) / 2.0f;