Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 16:12:51 +02:00
Fix #1370
- Actually override toNative in adapter - Correctly assign generic-type - Better default method for BinaryTag retrieval in adapter
Dieser Commit ist enthalten in:
Ursprung
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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren