mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2025-01-04 18:37:36 +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();
|
||||
|
||||
manager.addEnableListener(() -> {
|
||||
this.init(new File(getDataFolder(), "config.yml"));
|
||||
|
||||
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||
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"));
|
||||
|
||||
final ViaManager manager = Via.getManager();
|
||||
|
||||
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
||||
manager.addPostEnableListener(() -> {
|
||||
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,10 +63,10 @@ public class VelocityPlugin implements ViaAprilFoolsPlatform {
|
||||
this.logger = new LoggerWrapper(loggerSlf4j);
|
||||
final ViaManager manager = Via.getManager();
|
||||
|
||||
manager.addEnableListener(() -> {
|
||||
this.init(new File(getDataFolder(), "config.yml"));
|
||||
|
||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(new VelocityVersionProvider()));
|
||||
manager.addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
|
||||
manager.addPostEnableListener(() -> {
|
||||
final VersionProvider delegate = manager.getProviders().get(VersionProvider.class);
|
||||
manager.getProviders().use(VersionProvider.class, new VAFServerVersionProvider(delegate));
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user