From c7dc80b71b9b534adf0a5b06cebaedd46faa441f Mon Sep 17 00:00:00 2001 From: vadage Date: Fri, 5 Apr 2024 20:32:47 +0200 Subject: [PATCH] Support config loading from input stream (#718) --- .../com/viaversion/viabackwards/ViaBackwardsConfig.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/src/main/java/com/viaversion/viabackwards/ViaBackwardsConfig.java b/common/src/main/java/com/viaversion/viabackwards/ViaBackwardsConfig.java index 8bb9ab29..dff53446 100644 --- a/common/src/main/java/com/viaversion/viabackwards/ViaBackwardsConfig.java +++ b/common/src/main/java/com/viaversion/viabackwards/ViaBackwardsConfig.java @@ -19,6 +19,7 @@ package com.viaversion.viabackwards; import com.viaversion.viaversion.util.Config; import java.io.File; +import java.io.InputStream; import java.net.URL; import java.util.Collections; import java.util.List; @@ -87,6 +88,11 @@ public class ViaBackwardsConfig extends Config implements com.viaversion.viaback return getClass().getClassLoader().getResource("assets/viabackwards/config.yml"); } + @Override + public InputStream getDefaultConfigInputStream() { + return getClass().getClassLoader().getResourceAsStream("assets/viabackwards/config.yml"); + } + @Override protected void handleConfig(Map map) { }