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