当前位置: 首页>>代码示例>>Java>>正文


Java FireworkMeta.getEffects方法代码示例

本文整理汇总了Java中org.bukkit.inventory.meta.FireworkMeta.getEffects方法的典型用法代码示例。如果您正苦于以下问题:Java FireworkMeta.getEffects方法的具体用法?Java FireworkMeta.getEffects怎么用?Java FireworkMeta.getEffects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.inventory.meta.FireworkMeta的用法示例。


在下文中一共展示了FireworkMeta.getEffects方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setFrom

import org.bukkit.inventory.meta.FireworkMeta; //导入方法依赖的package包/类
@Override
public SubMeta setFrom(ItemMeta meta) {
    if(meta instanceof FireworkMeta){
        FireworkMeta metas = (FireworkMeta) meta;
        power = metas.getPower();
        for(FireworkEffect eff : metas.getEffects())
            facts.add(new FireworkEffects(eff));
    }
    return this;
}
 
开发者ID:DevCrafters,项目名称:SaveableSerializing,代码行数:11,代码来源:FireworksMeta.java

示例2: CardboardMetaFirework

import org.bukkit.inventory.meta.FireworkMeta; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public CardboardMetaFirework(ItemStack firework) {

	this.id = firework.getTypeId();
	FireworkMeta meta = (FireworkMeta) firework.getItemMeta();
	for (FireworkEffect fw : meta.getEffects()) {
		this.effects.add(new CardboardFireworkEffect(fw));
	}

	this.power = meta.getPower();
}
 
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:12,代码来源:CardboardMetaFirework.java

示例3: CardboardMetaFirework

import org.bukkit.inventory.meta.FireworkMeta; //导入方法依赖的package包/类
public CardboardMetaFirework(ItemStack firework) {

		this.id = firework.getTypeId();
		FireworkMeta meta = (FireworkMeta) firework.getItemMeta();
		for (FireworkEffect fw : meta.getEffects()) {
			this.effects.add(new CardboardFireworkEffect(fw));
		}

		this.power = meta.getPower();
	}
 
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:11,代码来源:CardboardMetaFirework.java

示例4: initialize

import org.bukkit.inventory.meta.FireworkMeta; //导入方法依赖的package包/类
@Override
public SerialItemData initialize(ItemStack stack) {
  ItemMeta meta = stack.getItemMeta();
  if(meta instanceof FireworkMeta) {
    valid = true;

    FireworkMeta fireworkMeta = (FireworkMeta)meta;
    power = fireworkMeta.getPower();
    effects = fireworkMeta.getEffects();
  }
  return this;
}
 
开发者ID:TheNewEconomy,项目名称:TNE-Bukkit,代码行数:13,代码来源:FireworkData.java

示例5: getFireworkMetaString

import org.bukkit.inventory.meta.FireworkMeta; //导入方法依赖的package包/类
private static String getFireworkMetaString(final FireworkMeta meta, final String[] separators) {
    final int power = meta.getPower();
    final List<FireworkEffect> effects = meta.getEffects();

    final StringBuilder builder = new StringBuilder();
    builder.append(Integer.toString(power)).append(separators[1]);
    if (!effects.isEmpty()) {
        builder.append(getFireworkEffectString(effects.get(0)));
        for (int i = 1; i < effects.size(); i++) {
            builder.append(separators[1]).append(getFireworkEffectString(effects.get(i)));
        }
    }

    return builder.toString();
}
 
开发者ID:Ribesg,项目名称:NPlugins,代码行数:16,代码来源:ItemMetaUtil.java


注:本文中的org.bukkit.inventory.meta.FireworkMeta.getEffects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。