本文整理汇总了Java中net.minecraft.server.StatisticList类的典型用法代码示例。如果您正苦于以下问题:Java StatisticList类的具体用法?Java StatisticList怎么用?Java StatisticList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StatisticList类属于net.minecraft.server包,在下文中一共展示了StatisticList类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getMaterialStatistic
import net.minecraft.server.StatisticList; //导入依赖的package包/类
public static net.minecraft.server.Statistic getMaterialStatistic(org.bukkit.Statistic stat, Material material) {
try {
if (stat == Statistic.MINE_BLOCK) {
return StatisticList.MINE_BLOCK_COUNT[material.getId()];
}
if (stat == Statistic.CRAFT_ITEM) {
return StatisticList.CRAFT_BLOCK_COUNT[material.getId()];
}
if (stat == Statistic.USE_ITEM) {
return StatisticList.USE_ITEM_COUNT[material.getId()];
}
if (stat == Statistic.BREAK_ITEM) {
return StatisticList.BREAK_ITEM_COUNT[material.getId()];
}
} catch (ArrayIndexOutOfBoundsException e) {
return null;
}
return null;
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:20,代码来源:CraftStatistic.java
示例2: tabCompleteInternalStatisticOrAchievementName
import net.minecraft.server.StatisticList; //导入依赖的package包/类
@Override
public List<String> tabCompleteInternalStatisticOrAchievementName(String token, List<String> completions) {
List<String> matches = new ArrayList<String>();
Iterator iterator = StatisticList.stats.iterator();
while (iterator.hasNext()) {
String statistic = ((net.minecraft.server.Statistic) iterator.next()).name;
if (statistic.startsWith(token)) {
matches.add(statistic);
}
}
return matches;
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:13,代码来源:CraftMagicNumbers.java
示例3: setup
import net.minecraft.server.StatisticList; //导入依赖的package包/类
@BeforeClass
public static void setup() {
StatisticList.a();
DummyServer.setup();
DummyPotions.setup();
DummyEnchantments.setup();
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:8,代码来源:AbstractTestingBase.java
示例4: getNMSStatistic
import net.minecraft.server.StatisticList; //导入依赖的package包/类
public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic statistic) {
return StatisticList.getStatistic(statistics.inverse().get(statistic));
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:4,代码来源:CraftStatistic.java
示例5: getNMSAchievement
import net.minecraft.server.StatisticList; //导入依赖的package包/类
public static net.minecraft.server.Achievement getNMSAchievement(org.bukkit.Achievement achievement) {
return (net.minecraft.server.Achievement) StatisticList.getStatistic(achievements.inverse().get(achievement));
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:4,代码来源:CraftStatistic.java
注:本文中的net.minecraft.server.StatisticList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论