mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-14 22:56:12 +01:00
Fix binding plugin and bump MockBukkit
This commit is contained in:
parent
ec0000bc8a
commit
7246d433bc
@ -117,7 +117,7 @@ dependencies {
|
||||
|
||||
// Tests
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10'
|
||||
testImplementation 'com.github.seeseemelk:MockBukkit-v1.19:2.141.0'
|
||||
testImplementation 'com.github.seeseemelk:MockBukkit-v1.20:3.20.0'
|
||||
testImplementation('com.googlecode.json-simple:json-simple:1.1.1') {
|
||||
exclude group: 'junit', module: 'junit'
|
||||
}
|
||||
|
@ -151,6 +151,10 @@ public class MultiverseCore extends JavaPlugin implements MVCore {
|
||||
*/
|
||||
@Override
|
||||
public void onDisable() {
|
||||
if (serviceLocator == null) {
|
||||
// TODO: This is a workaround while waiting for MockBukkit to fix their onDisable being called twice
|
||||
return;
|
||||
}
|
||||
this.saveAllConfigs();
|
||||
shutdownDependencyInjection();
|
||||
Logging.shutdown();
|
||||
|
@ -30,6 +30,7 @@ public abstract class PluginBinder<T extends Plugin> extends AbstractBinder {
|
||||
protected final void configure() {
|
||||
var bindingBuilder = bindPlugin(getPlugin());
|
||||
bindingBuilder.to(Plugin.class);
|
||||
bindPluginClass(bindingBuilder);
|
||||
bind(plugin.getLogger()).to(Logger.class);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user