mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 18:05:57 +03:00
26 lines
915 B
Diff
26 lines
915 B
Diff
--- ../src-base/minecraft/net/minecraft/stats/StatisticsManagerServer.java
|
|
+++ ../src-work/minecraft/net/minecraft/stats/StatisticsManagerServer.java
|
|
@@ -36,6 +36,14 @@
|
|
{
|
|
this.mcServer = serverIn;
|
|
this.statsFile = statsFileIn;
|
|
+ // Spigot start
|
|
+ for (String name : org.spigotmc.SpigotConfig.forcedStats.keySet())
|
|
+ {
|
|
+ TupleIntJsonSerializable wrapper = new TupleIntJsonSerializable();
|
|
+ wrapper.setIntegerValue(org.spigotmc.SpigotConfig.forcedStats.get(name));
|
|
+ statsData.put(StatList.getOneShotStat(name), wrapper);
|
|
+ }
|
|
+ // Spigot end
|
|
}
|
|
|
|
public void readStatFile()
|
|
@@ -60,6 +68,7 @@
|
|
|
|
public void saveStatFile()
|
|
{
|
|
+ if (org.spigotmc.SpigotConfig.disableStatSaving) return; // Spigot
|
|
try
|
|
{
|
|
FileUtils.writeStringToFile(this.statsFile, dumpJson(this.statsData));
|