Java 类net.minecraft.server.StatisticList 实例源码

项目:CraftBukkit    文件:CraftStatistic.java   
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;
}
项目:Craftbukkit    文件:CraftStatistic.java   
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;
}
项目:Tweakkit-Server    文件:CraftStatistic.java   
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;
}
项目:CraftBukkit    文件:CraftMagicNumbers.java   
@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;
}
项目:Craftbukkit    文件:CraftMagicNumbers.java   
@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;
}
项目:Almura-Server    文件:AbstractTestingBase.java   
@BeforeClass
public static void setup() {
    StatisticList.a();
    DummyServer.setup();
    DummyPotions.setup();
    DummyEnchantments.setup();
}
项目:Tweakkit-Server    文件:CraftMagicNumbers.java   
@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;
}
项目:SpigotSource    文件:CraftMagicNumbers.java   
@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;
}
项目:Craft-city    文件:AbstractTestingBase.java   
@BeforeClass
public static void setup() {
    StatisticList.a();
    DummyServer.setup();
    DummyPotions.setup();
    DummyEnchantments.setup();
}
项目:CraftBukkit    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic statistic) {
    return StatisticList.getStatistic(statistics.inverse().get(statistic));
}
项目:CraftBukkit    文件:CraftStatistic.java   
public static net.minecraft.server.Achievement getNMSAchievement(org.bukkit.Achievement achievement) {
    return (net.minecraft.server.Achievement) StatisticList.getStatistic(achievements.inverse().get(achievement));
}
项目:Craftbukkit    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic statistic) {
    return StatisticList.getStatistic(statistics.inverse().get(statistic));
}
项目:Craftbukkit    文件:CraftStatistic.java   
public static net.minecraft.server.Achievement getNMSAchievement(org.bukkit.Achievement achievement) {
    return (net.minecraft.server.Achievement) StatisticList.getStatistic(achievements.inverse().get(achievement));
}
项目:Tweakkit-Server    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic statistic) {
    return StatisticList.getStatistic(statistics.inverse().get(statistic));
}
项目:Tweakkit-Server    文件:CraftStatistic.java   
public static net.minecraft.server.Achievement getNMSAchievement(org.bukkit.Achievement achievement) {
    return (net.minecraft.server.Achievement) StatisticList.getStatistic(achievements.inverse().get(achievement));
}
项目:SpigotSource    文件:CraftStatistic.java   
public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic statistic) {
    return StatisticList.getStatistic(statistics.inverse().get(statistic));
}
项目:SpigotSource    文件:CraftStatistic.java   
public static net.minecraft.server.Achievement getNMSAchievement(org.bukkit.Achievement achievement) {
    return (net.minecraft.server.Achievement) StatisticList.getStatistic(achievements.inverse().get(achievement));
}