Null check

This commit is contained in:
fullwall 2020-07-17 12:35:36 +08:00
parent b14f0bac9c
commit 65aa07a09d

View File

@ -35,6 +35,9 @@ public class ClickRedirectTrait extends Trait {
@Override @Override
public void save(DataKey key) { public void save(DataKey key) {
key.removeKey("uuid");
if (redirectNPC == null)
return;
key.setString("uuid", redirectNPC.getUniqueId().toString()); key.setString("uuid", redirectNPC.getUniqueId().toString());
} }
} }