Add override and correct default method for fromNative

- Fixes #1370
This commit is contained in:
dordsor21 2021-10-20 13:47:55 +01:00
parent e7a6c3e58c
commit 8ed4736066
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
2 changed files with 5 additions and 1 deletions

View File

@ -909,6 +909,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
* @param foreign structure to convert
* @return non-native structure
*/
@Override
public net.minecraft.nbt.Tag fromNative(Tag foreign) {
if (foreign == null) {
return null;

View File

@ -298,8 +298,11 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
}
default T fromNativeBinary(BinaryTag foreign) {
if (foreign == null) {
return null;
}
return fromNative(AdventureNBTConverter.fromAdventure(foreign));
}
@Nullable
default World createWorld(WorldCreator creator) {