本文整理汇总了Java中net.canarymod.api.statistics.Stat类的典型用法代码示例。如果您正苦于以下问题:Java Stat类的具体用法?Java Stat怎么用?Java Stat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Stat类属于net.canarymod.api.statistics包,在下文中一共展示了Stat类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: restoreStatistics
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
private void restoreStatistics(final String statistics, final Player player) {
final StringTokenizer st = new StringTokenizer(statistics, ";");
while (st.hasMoreTokens()) {
final String t = st.nextToken();
final int i = t.indexOf("=");
final String statName = t.substring(0, i);
final Stat s = STATS_FACTORY.getStat(statName);
player.setStat(s, Integer.parseInt(t.substring(i + 1)));
}
}
示例2: statistics
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public Packet statistics(Map<Stat, Integer> stats) {
return null;
}
示例3: getStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public Stat getStat(String nmsName) {
return (Stat) StatList.getOneShotStat(nmsName);
}
示例4: getStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public int getStat(Stat stat) {
return this.statsFile.readStat((StatBase) stat);
}
示例5: setStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void setStat(Stat stat, int value) {
this.statisticsFile.unlockAchievement(null, (StatBase) stat, value);
}
示例6: increaseStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void increaseStat(Stat stat, int value) {
if (value < 0) return;
this.statisticsFile.increaseStat(null, (StatBase) stat, value);
}
示例7: decreaseStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void decreaseStat(Stat stat, int value) {
if (value < 0) return;
this.setStat(stat, this.getStat(stat) - value);
}
示例8: getStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public int getStat(Stat stat) {
return this.statisticsFile.readStat((StatBase) stat);
}
示例9: setStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void setStat(Stat stat, int value) {
this.statsFile.unlockAchievement((EntityPlayerMP) (Object) this, (StatBase) stat, value);
}
示例10: increaseStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void increaseStat(Stat stat, int value) {
if (value < 0) return;
this.statsFile.increaseStat((EntityPlayerMP) (Object) this, (StatBase) stat, value);
}
示例11: setStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void setStat(Stat stat, int value) {
}
示例12: increaseStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void increaseStat(Stat stat, int value) {
}
示例13: decreaseStat
import net.canarymod.api.statistics.Stat; //导入依赖的package包/类
@Override
public void decreaseStat(Stat stat, int value) {
}