Class ServerStatHandler

java.lang.Object
net.minecraft.stat.StatHandler
net.minecraft.stat.ServerStatHandler

public class ServerStatHandler
extends StatHandler
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • server

      private final MinecraftServer server
    • file

      private final File file
    • pendingStats

      private final Set<Stat<?>> pendingStats
    • lastStatsUpdate

      private int lastStatsUpdate
  • Constructor Details

  • Method Details

    • save

      public void save()
    • setStat

      public void setStat​(PlayerEntity player, Stat<?> stat, int value)
      Overrides:
      setStat in class StatHandler
    • takePendingStats

      private Set<Stat<?>> takePendingStats()
    • parse

      public void parse​(com.mojang.datafixers.DataFixer dataFixer, String json)
    • createStat

      private <T> Optional<Stat<T>> createStat​(StatType<T> type, String id)
    • jsonToCompound

      private static CompoundTag jsonToCompound​(JsonObject jsonObject)
    • asString

      protected String asString()
    • getStatId

      private static <T> Identifier getStatId​(Stat<T> stat)
    • updateStatSet

      public void updateStatSet()
    • sendStats

      public void sendStats​(ServerPlayerEntity player)