Convert Market to Dat File Command / Config Support

Faster Loading Speeds for LARGE Markets
This commit is contained in:
Kam committed 2024-02-20 02:07:38 -05:00
1 parent 69185de3f3
commit 3e48773940
5 files changed
+248 -39

No files matched your search

@@ -1100,7 +1100,6 @@ public class PacketHandlerServer{
Market.setMarket(npc, market);
else
Market.save((RoleTrader)npc.roleInterface, market);
//NoppesUtilServer.sendRoleData(player, npc);
}
}
else if(type == EnumPacketServer.AnimationsGet){
@@ -63,6 +63,10 @@ public class ConfigMain
public static Property DatFormatProperty;
public static boolean DatFormat = false;
public static Property MarketDatFormatProperty;
public static boolean MarketDatFormat = false;
public static Property DefaultMaxPartySizetProperty;
public static int DefaultMaxPartySize = 4;
@@ -152,6 +156,9 @@ public class ConfigMain
DatFormatProperty = config.get(GENERAL, "Dat Format for PlayerData", false, "You need to use '/kamkeel config playerdata' to convert existing playerdata to new format.");
DatFormat = DatFormatProperty.getBoolean(false);
MarketDatFormatProperty = config.get(GENERAL, "Dat Format for Market", false, "You need to use '/kamkeel config market' to convert existing market to new format.");
MarketDatFormat = MarketDatFormatProperty.getBoolean(false);
DefaultMaxPartySizetProperty = config.get(GENERAL, "Default Max Party Size", 4, "When creating a new Quest sets the default max party size");
DefaultMaxPartySize = DefaultMaxPartySizetProperty.getInt(4);
@@ -280,4 +287,4 @@ public class ConfigMain
}
}
}
}
}
@@ -242,7 +242,7 @@ public class PlayerDataController {
return new NBTTagCompound();
}
public NBTTagCompound loadNBTData(File file){
public static NBTTagCompound loadNBTData(File file){
try {
return CompressedStreamTools.readCompressed(new FileInputStream(file));
} catch (Exception e) {