Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 50 lines 1.4 kB view raw
1package net.minecraft.server; 2 3import java.text.DecimalFormat; 4import java.text.NumberFormat; 5import java.util.Locale; 6 7public class Statistic { 8 9 public final int e; 10 public final String f; 11 public boolean g; 12 public String h; 13 private final Counter a; 14 private static NumberFormat b = NumberFormat.getIntegerInstance(Locale.US); 15 public static Counter i = new UnknownCounter(); 16 private static DecimalFormat c = new DecimalFormat("########0.00"); 17 public static Counter j = new TimeCounter(); 18 public static Counter k = new DistancesCounter(); 19 20 public Statistic(int i, String s, Counter counter) { 21 this.g = false; 22 this.e = i; 23 this.f = s; 24 this.a = counter; 25 } 26 27 public Statistic(int i, String s) { 28 this(i, s, Statistic.i); 29 } 30 31 public Statistic e() { 32 this.g = true; 33 return this; 34 } 35 36 public Statistic d() { 37 if (StatisticList.a.containsKey(Integer.valueOf(this.e))) { 38 throw new RuntimeException("Duplicate stat id: \"" + ((Statistic) StatisticList.a.get(Integer.valueOf(this.e))).f + "\" and \"" + this.f + "\" at id " + this.e); 39 } else { 40 StatisticList.b.add(this); 41 StatisticList.a.put(Integer.valueOf(this.e), this); 42 this.h = AchievementMap.a(this.e); 43 return this; 44 } 45 } 46 47 public String toString() { 48 return this.f; 49 } 50}