mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-27 10:41:27 +01:00
SPIGOT-742: Throw an exception instead of passing null when the sender cannot be converted
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
290b584eb4
commit
3b1579527f
@ -161,7 +161,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
|
|||||||
if (sender instanceof ProxiedCommandSender) {
|
if (sender instanceof ProxiedCommandSender) {
|
||||||
return ((ProxiedNativeCommandSender) sender).getHandle();
|
return ((ProxiedNativeCommandSender) sender).getHandle();
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Cannot make " + sender + " a vanilla command listener");
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getPlayerListSize(String as[]) {
|
private int getPlayerListSize(String as[]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user