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

cn.nukkit.item.StringItem Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
package cn.nukkit.item;

import cn.nukkit.api.PowerNukkitOnly;
import cn.nukkit.api.PowerNukkitXDifference;

/**
 * @author joserobjr
 * @since 2021-06-12
 */
@PowerNukkitOnly
@PowerNukkitXDifference(info = "Change to interface,Remove CustomCompound from StringItem")
public interface StringItem {
    String getNamespaceId();

    static String notEmpty(String value) {
        if (value != null && value.trim().isEmpty()) throw new IllegalArgumentException("The name cannot be empty");
        return value;
    }

    default int getId() {
        return ItemID.STRING_IDENTIFIED_ITEM;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy