At startup every pack in the folder is loaded, so the vehicles exist before any world does. + * When a server starts (single player included) and on {@code /mcheli reload}, the folder is + * scanned again and the server config applied: the allow list, the size limit per pack and the + * limit for all packs together. The packs that pass are what players get sent. + * + *
A zip pack is read in place, so packs stay open while their definitions and assets are in
+ * use. The set a reload replaces is closed on the reload after that, so a client in the same game
+ * that is still drawing from it never reads from a closed zip.
+ */
+public final class ContentPacks {
+ private static final int PROBLEMS_IN_CHAT = 8;
+ private static final String SOUNDS = "assets/mcheli/sounds/";
+
+ private final Path folder;
+ private final PendingPacks pending;
+ private final LegacyContent legacy;
+ private volatile List