mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
SPIGOT-742: Throw an exception instead of passing null when the sender cannot be converted
This commit is contained in:
1 parent
85cf593df9
commit
a25c96eda7
1 file changed
+1
-1
@@ -161,7 +161,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
|
||||
if (sender instanceof ProxiedCommandSender) {
|
||||
return ((ProxiedNativeCommandSender) sender).getHandle();
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Cannot make " + sender + " a vanilla command listener");
|
||||
}
|
||||
|
||||
private int getPlayerListSize(String as[]) {
|
||||
|
||||
Reference in new issue
Block a user