本文整理汇总了Java中org.bukkit.support.Util类的典型用法代码示例。如果您正苦于以下问题:Java Util类的具体用法?Java Util怎么用?Java Util使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Util类属于org.bukkit.support包,在下文中一共展示了Util类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testEffectCompleteness
import org.bukkit.support.Util; //导入依赖的package包/类
@Test
public void testEffectCompleteness() throws Throwable {
Map<Integer, ?> effectDurations = Util.getInternalState(net.minecraft.server.PotionBrewer.class, null, "effectDurations");
Map<PotionType, String> effects = new EnumMap(PotionType.class);
for (int id : effectDurations.keySet()) {
PotionEffectType type = PotionEffectType.getById(id);
assertNotNull(String.valueOf(id), PotionEffectType.getById(id));
PotionType enumType = PotionType.getByEffect(type);
assertNotNull(type.getName(), enumType);
assertThat(enumType.name(), effects.put(enumType, enumType.name()), is(nullValue()));
}
assertThat(effects.entrySet(), hasSize(effectDurations.size()));
assertThat(effectDurations.entrySet(), hasSize(PotionType.values().length - /* WATER */ 1));
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:19,代码来源:PotionTest.java
示例2: verifyMapping
import org.bukkit.support.Util; //导入依赖的package包/类
@Test
@SuppressWarnings("unchecked")
public void verifyMapping() throws Throwable {
List<Achievement> achievements = Lists.newArrayList(Achievement.values());
for (net.minecraft.server.Achievement statistic : (List<net.minecraft.server.Achievement>) AchievementList.e) {
int id = statistic.e;
String name = Util.getInternalState(Statistic.class, statistic, "a");
String message = String.format("org.bukkit.Achievement is missing id: %d named: '%s'", id - Achievement.STATISTIC_OFFSET, name);
Achievement subject = Achievement.getById(id);
assertNotNull(message, subject);
assertTrue(name, achievements.remove(subject));
}
assertThat("org.bukkit.Achievement has too many achievements", achievements, is(Collections.EMPTY_LIST));
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:20,代码来源:AchievementTest.java
示例3: getFireValues
import org.bukkit.support.Util; //导入依赖的package包/类
@BeforeClass
public static void getFireValues() {
fireValues = Util.getInternalState(BlockFire.class, Blocks.FIRE, "a");
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:5,代码来源:PerMaterialTest.java
示例4: getFireValues
import org.bukkit.support.Util; //导入依赖的package包/类
@BeforeClass
public static void getFireValues() {
fireValues = Util.getInternalState(BlockFire.class, Blocks.FIRE, "flameChances");
}
开发者ID:tgnmc,项目名称:Craftbukkit,代码行数:5,代码来源:PerMaterialTest.java
示例5: getFireValues
import org.bukkit.support.Util; //导入依赖的package包/类
@BeforeClass
public static void getFireValues() {
fireValues = Util.getInternalState(BlockFire.class, Block.FIRE, "a");
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:5,代码来源:PerMaterialTest.java
注:本文中的org.bukkit.support.Util类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论