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,14 +101,11 @@ public class BukkitTelnetBridge extends FreedomService
try try
{ {
final Plugin bukkitTelnet = server.getPluginManager().getPlugin("BukkitTelnet"); 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) catch (Exception ex)
{ {
FLog.severe(ex); FLog.severe(ex);