mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-27 01:32:08 +01:00
Handle null causes by skipping them.
This commit is contained in:
parent
b4880ae982
commit
acc39e11b1
@ -80,6 +80,10 @@ public static boolean mayInvolvePlayer(List<? extends Cause<?>> causes) {
|
||||
public static List<? extends Cause<?>> create(Object ... cause) {
|
||||
List<Cause<?>> causes = new ArrayList<Cause<?>>(cause.length);
|
||||
for (Object o : cause) {
|
||||
if (o == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (o instanceof Player) {
|
||||
causes.add(new PlayerCause((Player) o));
|
||||
} else if (o instanceof Block) {
|
||||
|
Loading…
Reference in New Issue
Block a user