Support config loading from input stream (#718)

This commit is contained in:
vadage 2024-04-05 20:32:47 +02:00 committed by GitHub
parent 2ffa852c92
commit c7dc80b71b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ package com.viaversion.viabackwards;
import com.viaversion.viaversion.util.Config; import com.viaversion.viaversion.util.Config;
import java.io.File; import java.io.File;
import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.util.Collections; import java.util.Collections;
import java.util.List; 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"); return getClass().getClassLoader().getResource("assets/viabackwards/config.yml");
} }
@Override
public InputStream getDefaultConfigInputStream() {
return getClass().getClassLoader().getResourceAsStream("assets/viabackwards/config.yml");
}
@Override @Override
protected void handleConfig(Map<String, Object> map) { protected void handleConfig(Map<String, Object> map) {
} }