mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-20 23:21:32 +01:00
Avoid - character in saving lookclose
This commit is contained in:
parent
9d07084635
commit
d459e7426f
@ -77,7 +77,7 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
|
||||
enabled = key.getBoolean("enabled", key.getBoolean(""));
|
||||
// TODO: remove key.getBoolean("") ^ after a few updates
|
||||
range = key.getDouble("range", range);
|
||||
realisticLooking = key.getBoolean("realistic-looking", false);
|
||||
realisticLooking = key.getBoolean("realisticlooking", key.getBoolean("realistic-looking"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -90,15 +90,24 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
|
||||
Util.faceEntity(npc.getBukkitEntity(), lookingAt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDespawn() {
|
||||
lookingAt = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(DataKey key) {
|
||||
if (key.keyExists("")) {
|
||||
// TODO: remove after a few updates
|
||||
key.removeKey("");
|
||||
}
|
||||
if (key.keyExists("realistic-looking")) {
|
||||
// TODO: remove after a few updates
|
||||
key.removeKey("realistic-looking");
|
||||
}
|
||||
key.setBoolean("enabled", enabled);
|
||||
key.setDouble("range", range);
|
||||
key.setBoolean("realistic-looking", realisticLooking);
|
||||
key.setBoolean("realisticlooking", realisticLooking);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user