diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 71ea2a4733..c82a6ef2df 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -594,7 +594,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @PostProcess + private void postProcess() { -+ if (this.enabled && this.secret.isEmpty()) { ++ if (!this.enabled) return; ++ ++ final String environmentSourcedVelocitySecret = System.getenv("PAPER_VELOCITY_SECRET"); ++ if (environmentSourcedVelocitySecret != null && !environmentSourcedVelocitySecret.isEmpty()) { ++ this.secret = environmentSourcedVelocitySecret; ++ } ++ ++ if (this.secret.isEmpty()) { + LOGGER.error("Velocity is enabled, but no secret key was specified. A secret key is required. Disabling velocity..."); + this.enabled = false; + }