geforkt von Mirrors/Paper
Fix SafeNBTCopy#hasKey semantics
Fixes hasKey to check that a key actually exists, while retaining the option to scream at keys which are requested which haven't been marked as needing to be copied
Dieser Commit ist enthalten in:
Ursprung
2942a2d247
Commit
f2a3a8db27
@ -61,8 +61,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean hasKey(String s) {
|
||||
+ if (this.keys.contains(s)) {
|
||||
+ if (super.hasKey(s)) {
|
||||
+ return true;
|
||||
+ } else if (keys.contains(s)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ throw new IllegalStateException("Missing Key " + s + " in SafeNBTCopy");
|
||||
+ }
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren