1
0
Fork 0
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:
Shane Freeder 2020-10-17 12:20:44 +01:00
parent db28a6b208
commit 2942a2d247

View file

@ -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);
+ }
+ }
+ }
+