Package net.minecraft.stat
Class ServerStatHandler
java.lang.Object
net.minecraft.stat.StatHandler
net.minecraft.stat.ServerStatHandler
public class ServerStatHandler extends StatHandler
-
Field Summary
Fields Modifier and Type Field Description private File
file
private int
lastStatsUpdate
private static Logger
LOGGER
private Set<Stat<?>>
pendingStats
private MinecraftServer
server
Fields inherited from class net.minecraft.stat.StatHandler
statMap
-
Constructor Summary
Constructors Constructor Description ServerStatHandler(MinecraftServer server, File file)
-
Method Summary
Modifier and Type Method Description protected String
asString()
private <T> Optional<Stat<T>>
createStat(StatType<T> type, String id)
private static <T> Identifier
getStatId(Stat<T> stat)
private static CompoundTag
jsonToCompound(JsonObject jsonObject)
void
parse(com.mojang.datafixers.DataFixer dataFixer, String json)
void
save()
void
sendStats(ServerPlayerEntity player)
void
setStat(PlayerEntity player, Stat<?> stat, int value)
private Set<Stat<?>>
takePendingStats()
void
updateStatSet()
Methods inherited from class net.minecraft.stat.StatHandler
getStat, getStat, increaseStat
-
Field Details
-
LOGGER
-
server
-
file
-
pendingStats
-
lastStatsUpdate
private int lastStatsUpdate
-
-
Constructor Details
-
ServerStatHandler
-
-
Method Details
-
save
public void save() -
setStat
- Overrides:
setStat
in classStatHandler
-
takePendingStats
-
parse
-
createStat
-
jsonToCompound
-
asString
-
getStatId
-
updateStatSet
public void updateStatSet() -
sendStats
-