From adc7b4a754e53e695038ebeac24bab3094eafdf3 Mon Sep 17 00:00:00 2001 From: Video Date: Thu, 29 Jul 2021 05:58:14 -0600 Subject: [PATCH] FS-333 According to Intellij, `bukkitTelnet instanceof BukkitTelnet` can replace the nullcheck. If this is not the case, then I apologize profoundly for my IDE's mistakes (again) --- .../totalfreedommod/bridge/BukkitTelnetBridge.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/BukkitTelnetBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/BukkitTelnetBridge.java index 479a30e1..21769cdb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/bridge/BukkitTelnetBridge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/bridge/BukkitTelnetBridge.java @@ -101,12 +101,9 @@ public class BukkitTelnetBridge extends FreedomService try { final Plugin bukkitTelnet = server.getPluginManager().getPlugin("BukkitTelnet"); - if (bukkitTelnet != null) + if (bukkitTelnet instanceof BukkitTelnet) { - if (bukkitTelnet instanceof BukkitTelnet) - { - bukkitTelnetPlugin = (BukkitTelnet)bukkitTelnet; - } + bukkitTelnetPlugin = (BukkitTelnet) bukkitTelnet; } } catch (Exception ex)