mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-05 02:10:10 +01:00
Fix controllable NPE
This commit is contained in:
parent
08d4aa5fc8
commit
02ca3e7388
@ -151,6 +151,9 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
@Override
|
@Override
|
||||||
public void save(DataKey key) {
|
public void save(DataKey key) {
|
||||||
key.setBoolean("enabled", enabled);
|
key.setBoolean("enabled", enabled);
|
||||||
|
if (explicitType == null)
|
||||||
|
key.removeKey("explicittype");
|
||||||
|
else
|
||||||
key.setString("explicittype", explicitType.name());
|
key.setString("explicittype", explicitType.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user