mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2026-03-10 02:12:01 +00:00
38 lines
1.5 KiB
Java
38 lines
1.5 KiB
Java
/*
|
|
* This file is part of ToolStats.
|
|
*
|
|
* ToolStats is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* ToolStats is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with ToolStats. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
package lol.hyper.toolstats;
|
|
|
|
import io.papermc.paper.plugin.loader.PluginClasspathBuilder;
|
|
import io.papermc.paper.plugin.loader.PluginLoader;
|
|
import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver;
|
|
import org.eclipse.aether.artifact.DefaultArtifact;
|
|
import org.eclipse.aether.graph.Dependency;
|
|
import org.eclipse.aether.repository.RemoteRepository;
|
|
|
|
public class ToolStatsLoader implements PluginLoader {
|
|
@Override
|
|
public void classloader(PluginClasspathBuilder classpathBuilder) {
|
|
MavenLibraryResolver resolver = new MavenLibraryResolver();
|
|
|
|
resolver.addRepository(new RemoteRepository.Builder("jitpack", "default", "https://jitpack.io").build());
|
|
resolver.addDependency(new Dependency(new DefaultArtifact("com.github.hyperdefined:hyperlib:1.0.9"), null));
|
|
|
|
classpathBuilder.addLibrary(resolver);
|
|
}
|
|
}
|