mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +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.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.NonNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import me.lucko.luckperms.api.Tristate;
|
import me.lucko.luckperms.api.Tristate;
|
||||||
@ -59,7 +60,7 @@ public abstract class SenderFactory<T> {
|
|||||||
|
|
||||||
protected abstract boolean hasPermission(T t, String node);
|
protected abstract boolean hasPermission(T t, String node);
|
||||||
|
|
||||||
public final Sender wrap(T t) {
|
public final Sender wrap(@NonNull T sender) {
|
||||||
return new AbstractSender<>(plugin, this, t);
|
return new AbstractSender<>(plugin, this, sender);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user