All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.condition.DataPredicate Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.condition;

import net.kyori.adventure.nbt.BinaryTag;
import net.minestom.server.utils.nbt.BinaryTagSerializer;
import org.jetbrains.annotations.NotNull;

public interface DataPredicate {
    record Noop(BinaryTag content) implements DataPredicate {

    }

    public static final BinaryTagSerializer NBT_TYPE = new BinaryTagSerializer() {
        @Override
        public @NotNull BinaryTag write(@NotNull DataPredicate value) {
            return ((Noop) value).content;
        }

        @Override
        public @NotNull DataPredicate read(@NotNull BinaryTag tag) {
            return new Noop(tag);
        }
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy