Use activate() if player for activate(Player) is null; resolves #885

This commit is contained in:
Daniel Saukel 2020-10-23 18:01:56 +02:00
parent ddaf0ddd65
commit 0dd3dac8e3
2 changed files with 10 additions and 2 deletions

View File

@ -41,7 +41,11 @@ public abstract class Rocker extends Deactivatable {
@Override
public void trigger(Player player) {
if (!isActive()) {
activate(player);
if (player != null) {
activate(player);
} else {
activate();
}
} else {
deactivate();
}

View File

@ -162,7 +162,11 @@ public abstract class Windup extends Deactivatable {
@Override
public void trigger(Player player) {
if (!isActive()) {
activate(player);
if (player != null) {
activate(player);
} else {
activate();
}
}
}