mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-19 15:09:25 +00:00
test build
This commit is contained in:
@@ -130,10 +130,6 @@ public interface CustomCropsAPI {
|
||||
*/
|
||||
@Nullable
|
||||
static CustomCropsAPI getInstance() {
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin("CustomCrops");
|
||||
if (plugin instanceof CustomCropsPlugin cc) {
|
||||
return cc.getAPI();
|
||||
}
|
||||
return null;
|
||||
return CustomCropsPlugin.getInstance().getAPI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,15 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public abstract class CustomCropsPlugin extends JavaPlugin {
|
||||
|
||||
protected static CustomCropsPlugin instance;
|
||||
|
||||
protected CustomCropsAPI customCropsAPI;
|
||||
|
||||
public CustomCropsAPI getAPI() {
|
||||
return customCropsAPI;
|
||||
}
|
||||
|
||||
public static CustomCropsPlugin getInstance() {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,18 @@ allprojects {
|
||||
}
|
||||
|
||||
subprojects {
|
||||
tasks.processResources {
|
||||
val props = mapOf("version" to version)
|
||||
inputs.properties(props)
|
||||
filteringCharset = "UTF-8"
|
||||
filesMatching("*plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(17)
|
||||
}
|
||||
|
||||
tasks.shadowJar {
|
||||
@@ -68,8 +77,17 @@ subprojects {
|
||||
archiveFileName.set("CustomCrops-" + project.name + "-" + project.version + ".jar")
|
||||
}
|
||||
|
||||
tasks.javadoc.configure {
|
||||
options.quiet()
|
||||
if ("api" == project.name) {
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
groupId = "net.momirealms"
|
||||
artifactId = "CustomCrops"
|
||||
version = rootProject.version.toString()
|
||||
artifact(tasks.shadowJar)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#systemProp.socks.proxyHost=127.0.0.1
|
||||
#systemProp.socks.proxyPort=7890
|
||||
|
||||
#
|
||||
#systemProp.http.proxyHost=127.0.0.1
|
||||
#systemProp.http.proxyPort=7890
|
||||
|
||||
#
|
||||
#systemProp.https.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyPort=7890
|
||||
|
||||
2
jitpack.yml
Normal file
2
jitpack.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
jdk:
|
||||
- openjdk17
|
||||
@@ -80,6 +80,7 @@ public final class CustomCrops extends CustomCropsPlugin {
|
||||
@Override
|
||||
public void onLoad(){
|
||||
plugin = this;
|
||||
instance = this;
|
||||
this.loadLibs();
|
||||
ProtectionLib.initialize(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user