package com.thatgravyboat.skyblockhud.api.sbentities; import java.util.function.Predicate; import net.minecraft.entity.Entity; public class SkyBlockEntity { private final String name; private final Predicate predicate; public static SkyBlockEntity of(String name, Predicate predicate) { return new SkyBlockEntity(name, predicate); } private SkyBlockEntity(String name, Predicate predicate) { this.name = name; this.predicate = predicate; } public String getName() { return name; } public boolean isEntity(Entity entity) { return predicate.test(entity); } }