mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-23 12:25:24 +01:00
Back to onenable tasks
This commit is contained in:
parent
90878517db
commit
f27c977be2
@ -36,7 +36,16 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
||||
|
||||
public BukkitPlugin() {
|
||||
Via.getManager().addEnableListener(() -> init(new File(getDataFolder(), "config.yml")));
|
||||
Via.getManager().addPostEnableListener(this::enable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
if (Via.getManager().getInjector().lateProtocolVersionSetting()) {
|
||||
// Enable in the next tick
|
||||
Via.getPlatform().runSync(this::enable, 1);
|
||||
} else {
|
||||
enable();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user