mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-15 07:05:28 +01:00
Merge pull request #2993 from Multiverse/fix-binding
Fix binding plugin and bump MockBukkit
This commit is contained in:
commit
12aedc1942
@ -55,10 +55,16 @@ repositories {
|
||||
name = 'glaremasters repo'
|
||||
url = 'https://repo.glaremasters.me/repository/towny/'
|
||||
}
|
||||
|
||||
maven {
|
||||
name = 'PlaceholderAPI'
|
||||
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
|
||||
}
|
||||
|
||||
maven {
|
||||
name = 'papermc repo'
|
||||
url = 'https://repo.papermc.io/repository/maven-public/'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
@ -117,7 +123,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.19.2'
|
||||
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