mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Throw an NPE if a null delegate sender is passed to SenderFactory#wrap
This commit is contained in:
parent
d9e5bc9345
commit
e2f800dd63
@ -27,6 +27,7 @@ package me.lucko.luckperms.common.commands.sender;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import me.lucko.luckperms.api.Tristate;
|
||||
@ -59,7 +60,7 @@ public abstract class SenderFactory<T> {
|
||||
|
||||
protected abstract boolean hasPermission(T t, String node);
|
||||
|
||||
public final Sender wrap(T t) {
|
||||
return new AbstractSender<>(plugin, this, t);
|
||||
public final Sender wrap(@NonNull T sender) {
|
||||
return new AbstractSender<>(plugin, this, sender);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user