Updated Via API usage (#601)

This commit is contained in:
EnZaXD 2023-10-08 06:51:49 +02:00 committed by GitHub
parent 54330702b1
commit 75680296e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -38,8 +38,8 @@ public class ViaBackwardsConfig extends Config implements com.viaversion.viaback
}
@Override
public void reloadConfig() {
super.reloadConfig();
public void reload() {
super.reload();
loadFields();
}

View File

@ -17,7 +17,9 @@
*/
package com.viaversion.viabackwards.api;
public interface ViaBackwardsConfig {
import com.viaversion.viaversion.api.configuration.Config;
public interface ViaBackwardsConfig extends Config {
/**
* Mimics name and level of a custom enchant through the item's lore.

View File

@ -74,7 +74,8 @@ public interface ViaBackwardsPlatform {
*/
default void init(File dataFolder) {
ViaBackwardsConfig config = new ViaBackwardsConfig(new File(dataFolder, "config.yml"));
config.reloadConfig();
config.reload();
Via.getManager().getConfigurationProvider().register(config);
ViaBackwards.init(this, config);