ago1024 / WurmServerModLauncher

Wurm Unlimited Mod Launcher
59 stars 21 forks source link

Serverpacks: allow sending file pack with a fixed name #62

Closed ago1024 closed 3 years ago

ago1024 commented 3 years ago

The ServerPacks interface has

    void addServerPack(Path path, ServerPackOptions... options);
    void addServerPack(byte[] data, ServerPackOptions... options);
    void addServerPack(String name, byte[] data, ServerPackOptions... options);

(1) and (2) send a pack with the SHA-1 hash as id. (3) uses a fixed name and is used for sending the packs with the generated map image.

Sending a file with a fixed name is currently not possible.

The change adds the new method to send a pack from a file with a fixed name.

    void addServerPack(String name, Path path, ServerPackOptions... options);