org.bukkit.NamespacedKey#minecraft ( )源码实例Demo

下面列出了org.bukkit.NamespacedKey#minecraft ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ProtocolSupport   文件: NamespacedKeyUtils.java
@SuppressWarnings("deprecation")
public static NamespacedKey fromString(String s) {
	if ((s == null) || s.isEmpty()) {
		return null;
	}
	String[] split = s.split(SEPARATOR, 2);
	if (split.length == 1) {
		return NamespacedKey.minecraft(split[0]);
	} else {
		return new NamespacedKey(split[0], split[1]);
	}
}
 
源代码2 项目: Slimefun4   文件: RecipeType.java
public RecipeType(MinecraftRecipe<?> recipe) {
    this.item = new ItemStack(recipe.getMachine());
    this.machine = "";
    this.key = NamespacedKey.minecraft(recipe.getRecipeClass().getSimpleName().toLowerCase(Locale.ROOT).replace("recipe", ""));
}
 
源代码3 项目: NovaGuilds   文件: EnchantmentGlow.java
/**
 * Glow enchantment constructor
 * Registers it as 'ngglow'
 */
public EnchantmentGlow() {
	super(NamespacedKey.minecraft("ngglow"));
}
 
 方法所在类
 同类方法