mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix #1370
- Actually override toNative in adapter - Correctly assign generic-type - Better default method for BinaryTag retrieval in adapter
This commit is contained in:
parent
4ee61a93c8
commit
13be5a22ad
@ -167,7 +167,7 @@ import java.util.stream.Collectors;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
public final class PaperweightAdapter implements BukkitImplAdapter {
|
||||
public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft.nbt.Tag> {
|
||||
|
||||
private final Logger logger = Logger.getLogger(getClass().getCanonicalName());
|
||||
|
||||
@ -835,7 +835,8 @@ public final class PaperweightAdapter implements BukkitImplAdapter {
|
||||
* @param foreign non-native NMS NBT structure
|
||||
* @return native WorldEdit NBT structure
|
||||
*/
|
||||
Tag toNative(net.minecraft.nbt.Tag foreign) {
|
||||
@Override
|
||||
public Tag toNative(net.minecraft.nbt.Tag foreign) {
|
||||
if (foreign == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
}
|
||||
|
||||
default BinaryTag toNativeBinary(T foreign) {
|
||||
return null;
|
||||
return toNative(foreign).asBinaryTag();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
Loading…
Reference in New Issue
Block a user