mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Use activate() if player for activate(Player) is null; resolves #885
This commit is contained in:
parent
ddaf0ddd65
commit
0dd3dac8e3
@ -41,7 +41,11 @@ public abstract class Rocker extends Deactivatable {
|
|||||||
@Override
|
@Override
|
||||||
public void trigger(Player player) {
|
public void trigger(Player player) {
|
||||||
if (!isActive()) {
|
if (!isActive()) {
|
||||||
|
if (player != null) {
|
||||||
activate(player);
|
activate(player);
|
||||||
|
} else {
|
||||||
|
activate();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
deactivate();
|
deactivate();
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,11 @@ public abstract class Windup extends Deactivatable {
|
|||||||
@Override
|
@Override
|
||||||
public void trigger(Player player) {
|
public void trigger(Player player) {
|
||||||
if (!isActive()) {
|
if (!isActive()) {
|
||||||
|
if (player != null) {
|
||||||
activate(player);
|
activate(player);
|
||||||
|
} else {
|
||||||
|
activate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user