mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2025-01-06 18:57:40 +01:00
Update VV API usage
This commit is contained in:
parent
5eb1f5730c
commit
0923ac71bb
@ -32,10 +32,10 @@ public class BukkitPlugin extends JavaPlugin implements ViaAprilFoolsPlatform {
|
|||||||
final ViaManager manager = Via.getManager();
|
final ViaManager manager = Via.getManager();
|
||||||
|
|
||||||
manager.addEnableListener(() -> {
|
manager.addEnableListener(() -> {
|
||||||
|
this.init(new File(getDataFolder(), "config.yml"));
|
||||||
|
|
||||||
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
||||||
|
|
||||||
this.init(new File(getDataFolder(), "config.yml"));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,9 +42,10 @@ public class ViaFabricAddon implements ViaAprilFoolsPlatform, Runnable {
|
|||||||
this.init(new File(getDataFolder(), "config.yml"));
|
this.init(new File(getDataFolder(), "config.yml"));
|
||||||
|
|
||||||
final ViaManager manager = Via.getManager();
|
final ViaManager manager = Via.getManager();
|
||||||
|
manager.addPostEnableListener(() -> {
|
||||||
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,10 +63,10 @@ public class VelocityPlugin implements ViaAprilFoolsPlatform {
|
|||||||
this.logger = new LoggerWrapper(loggerSlf4j);
|
this.logger = new LoggerWrapper(loggerSlf4j);
|
||||||
final ViaManager manager = Via.getManager();
|
final ViaManager manager = Via.getManager();
|
||||||
|
|
||||||
manager.addEnableListener(() -> {
|
manager.addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
|
||||||
this.init(new File(getDataFolder(), "config.yml"));
|
manager.addPostEnableListener(() -> {
|
||||||
|
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(new VelocityVersionProvider()));
|
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user