mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-22 09:07:56 +01:00
fix: manually boxing for targetable boolean state to prevent NPE (#3174)
* fix: manually boxing for comparison is necessary as the targetable state may undefined * chore: remove unused import
This commit is contained in:
parent
7f400dc672
commit
969d5cd396
@ -67,7 +67,7 @@ public class TargetableTrait extends Trait {
|
||||
}
|
||||
|
||||
public void setTargetable(boolean targetable) {
|
||||
if (this.targetable == targetable)
|
||||
if (Boolean.valueOf(targetable).equals(this.targetable))
|
||||
return;
|
||||
this.targetable = targetable;
|
||||
if (!targetable) {
|
||||
|
Loading…
Reference in New Issue
Block a user