Skip to content

Commit b521185

Browse files
SB2DDwillkroboth
andauthored
Fixed possible NPE for NullCommandSender
Co-authored-by: willkroboth <[email protected]>
1 parent eca31b7 commit b521185

File tree

1 file changed

+1
-1
lines changed
  • commandapi-platforms/commandapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi

1 file changed

+1
-1
lines changed

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/CommandAPIBukkit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ public BukkitCommandSender<? extends CommandSender> wrapCommandSender(CommandSen
411411
}
412412

413413
final Class<? extends CommandSender> NullCommandSender = paper.getNullCommandSender();
414-
if (NullCommandSender.isInstance(sender)) {
414+
if (NullCommandSender != null && NullCommandSender.isInstance(sender)) {
415415
// Since this should only be during a function load, this is just a placeholder to evade the exception.
416416
return null;
417417
}

0 commit comments

Comments
 (0)