From a496b2d3a82e2e9898cfb05909cafd7b66138c98 Mon Sep 17 00:00:00 2001 From: Myles Date: Sun, 17 Apr 2016 12:59:01 +0100 Subject: [PATCH] This branch would be better here as it won't be applicable if elsewhere. --- src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java b/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java index 33c458ca6..6363e4f2f 100644 --- a/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java +++ b/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java @@ -483,10 +483,11 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI, ViaVe if (info.getPacketsPerSecond() >= getWarningPPS()) { info.setWarnings(info.getWarnings() + 1); } - } - if (info.getWarnings() >= getMaxWarnings()) { - info.disconnect(getMaxWarningsKickMessage()); - return true; // don't send current packet + + if (info.getWarnings() >= getMaxWarnings()) { + info.disconnect(getMaxWarningsKickMessage()); + return true; // don't send current packet + } } } return false;