mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 18:31:53 +01:00
Don't assume that entries exist for SafeNBTCopy
This commit is contained in:
parent
db28a6b208
commit
2942a2d247
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public SafeNBTCopy(NBTTagCompound base, String... keys) {
|
||||
+ for (String key : keys) {
|
||||
+ this.keys.add(key);
|
||||
+ this.set(key, base.get(key));
|
||||
+ final NBTBase nbtBase = base.get(key);
|
||||
+ if (nbtBase != null) {
|
||||
+ this.set(key, nbtBase);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
|
Loading…
Add table
Reference in a new issue