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)
This commit is contained in:
Video 2021-07-29 05:58:14 -06:00
parent 40498c03f4
commit adc7b4a754

View File

@ -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)