Fixed circular plugin loading errors on Paper servers

This commit is contained in:
OmerBenGera 2023-10-05 15:31:33 +03:00
parent 6ba614dab1
commit eddaf54c99
3 changed files with 13 additions and 3 deletions

View File

@ -56,6 +56,7 @@ dependencies {
implementation 'com.bgsoftware.common.reflection:ReflectionUtils:latest' implementation 'com.bgsoftware.common.reflection:ReflectionUtils:latest'
implementation 'com.bgsoftware.common.config:CommentedConfiguration:1.0.3' implementation 'com.bgsoftware.common.config:CommentedConfiguration:1.0.3'
implementation 'com.bgsoftware.common.dependencies:DependenciesManager:b1'
// Spigot jars // Spigot jars
compileOnly "org.spigotmc:v1_8_R3:latest" compileOnly "org.spigotmc:v1_8_R3:latest"

View File

@ -1,5 +1,6 @@
package com.bgsoftware.wildloaders; package com.bgsoftware.wildloaders;
import com.bgsoftware.common.dependencies.DependenciesManager;
import com.bgsoftware.common.reflection.ReflectMethod; import com.bgsoftware.common.reflection.ReflectMethod;
import com.bgsoftware.wildloaders.api.WildLoaders; import com.bgsoftware.wildloaders.api.WildLoaders;
import com.bgsoftware.wildloaders.api.WildLoadersAPI; import com.bgsoftware.wildloaders.api.WildLoadersAPI;
@ -42,6 +43,9 @@ public final class WildLoadersPlugin extends JavaPlugin implements WildLoaders {
@Override @Override
public void onLoad() { public void onLoad() {
plugin = this; plugin = this;
DependenciesManager.inject(this);
new Metrics(this); new Metrics(this);
shouldEnable = loadNMSAdapter(); shouldEnable = loadNMSAdapter();

View File

@ -1,19 +1,24 @@
name: WildLoaders name: WildLoaders
version: ${project.version} version: ${project.version}
api-version: 1.13
main: com.bgsoftware.wildloaders.WildLoadersPlugin main: com.bgsoftware.wildloaders.WildLoadersPlugin
description: Highly configurable and optimized chunk-loaders plugin. description: Highly configurable and optimized chunk-loaders plugin.
website: https://bg-software.com/ website: https://bg-software.com/
authors: [Ome_R] api-version: 1.13
softdepend: author: Ome_R
# Custom section used by DependenciesManager, which replaces softdepend.
class-depends:
- EpicSpawners - EpicSpawners
- Factions - Factions
- FactionsX - FactionsX
- Lands - Lands
- SuperiorSkyblock2 - SuperiorSkyblock2
commands: commands:
loader: loader:
description: Main command for wild loaders. description: Main command for wild loaders.
permissions: permissions:
wildloaders.*: wildloaders.*:
description: Gives access to all the commands. description: Gives access to all the commands.