Skip to content

Lang files use "version" instead of "_version", causing redeploy and FileSystemException on every startup (Windows) #21

Open

Description

@RobThePCGuy

Version: ClickMobs paper-1.3.1 (from Modrinth), Paper 26.3 build 256, Java 25, Windows 11

What happens: every server start logs this, even though the language file on disk already matches the bundled one byte for byte:

[Configured] Version mismatch detected. Deploying from resource directory for 'en_US'...
[Configured] Deploying resource '/lang/en_US.json' to 'plugins\ClickMobs\lang\en_US.json'...
[Configured] Failed to deploy resource: plugins\ClickMobs\lang\en_US.json: The process cannot access the file because it is being used by another process
java.nio.file.FileSystemException: plugins\ClickMobs\lang\en_US.json: The process cannot access the file because it is being used by another process
        at java.base/java.nio.file.Files.copy(Files.java:2849)
        at ClickMobs-paper-1.3.1.jar//de.clickism.clickmobs.shadow.de.clickism.configured.localization.Localization.deploySingleResource(Localization.java:483)
        ...
        at ClickMobs-paper-1.3.1.jar//de.clickism.clickmobs.ClickMobs.onEnable(ClickMobs.java:76)

Cause: the bundled lang files (paper/src/main/resources/lang/en_US.json, de_DE.json) store their version as "version": 4, but Configured reads Config.VERSION_KEY = "_version". savedVersion() is therefore always empty, isVersionMismatch() returns true on every load, and the plugin tries to redeploy the file every startup. On Windows the overwrite then fails with the error above. If it succeeded, deployLocalizationFile would write _version and the loop would stop, so on Windows it never does. ClickVillagers ships "_version": 8 in its lang file and does not have the problem.

Fix: rename "version" to "_version" in the bundled lang files. Workaround for server owners: add "_version": 4, to plugins/ClickMobs/lang/en_US.json. I confirmed the file is now valid JSON; I haven't yet confirmed on a live server start that this stops the error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions