Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #117 from Shynixn/development
Browse files Browse the repository at this point in the history
Merge changes to master --release
  • Loading branch information
Shynixn authored Dec 15, 2023
2 parents ac52fe8 + 3e2e70d commit 43891aa
Show file tree
Hide file tree
Showing 15 changed files with 985 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN java -jar BuildTools.jar --rev 1.19.3 --remapped
RUN java -jar BuildTools.jar --rev 1.19.4 --remapped
RUN java -jar BuildTools.jar --rev 1.20.1 --remapped
RUN java -jar BuildTools.jar --rev 1.20.2 --remapped
RUN java -jar BuildTools.jar --rev 1.20.4 --remapped

# 3. Build plugin for 1.8 - 1.17 with jdk17
FROM amazoncorretto:17 AS plugin-jdk17
Expand All @@ -48,7 +49,7 @@ RUN ./gradlew build pluginJar --no-daemon
# 4. Launch a minecraft server with jdk17 and plugin
FROM amazoncorretto:17
# Change to the current plugin version present in build.gradle
ENV PLUGIN_VERSION=2.12.0
ENV PLUGIN_VERSION=2.13.0
# Change to the server version you want to test.
ENV SERVER_VERSION=spigot-1.19.4.jar
# Port of the Minecraft Server.
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ StructureBlockLib is a bukkit API and implementation for handling structures on
* API to save or load structures without an actual structure block.
* Asynchronous implementation and API.
* Fluent API.
* Version support 1.9.R1 - 1.20.R2
* Version support 1.9.R1 - 1.20.R3
* Java support 8 - Latest

## Installation
Expand All @@ -29,15 +29,15 @@ StructureBlockLib is a bukkit API and implementation for handling structures on
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-api</artifactId>
<version>2.12.0</version>
<version>2.13.0</version>
<scope>provided</scope>
</dependency>
```
**Gradle**

```xml
dependencies {
compileOnly("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.12.0")
compileOnly("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.13.0")
}
```

Expand Down Expand Up @@ -271,8 +271,8 @@ structureBlock.update();
**plugin.yml**
```yaml
libraries:
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.12.0
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.12.0
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.13.0
- com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.13.0
```
### For version < 1.17
Expand All @@ -291,22 +291,22 @@ go with the option above instead. There are several tutorials on spigotmc.org.
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-api</artifactId>
<version>2.12.0</version>
<version>2.13.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.shynixn.structureblocklib</groupId>
<artifactId>structureblocklib-bukkit-core</artifactId>
<version>2.12.0</version>
<version>2.13.0</version>
<scope>compile</scope>
</dependency>
```
**Gradle**

```xml
dependencies {
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.12.0")
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.12.0")
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-api:2.13.0")
implementation("com.github.shynixn.structureblocklib:structureblocklib-bukkit-core:2.13.0")
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks.register("printVersion") {

subprojects {
group 'com.github.shynixn.structureblocklib'
version '2.12.0'
version '2.13.0'

apply plugin: 'kotlin-platform-jvm'
apply plugin: 'signing'
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ include("structureblocklib-bukkit-core:bukkit-nms-119R2")
include("structureblocklib-bukkit-core:bukkit-nms-119R3")
include("structureblocklib-bukkit-core:bukkit-nms-120R1")
include("structureblocklib-bukkit-core:bukkit-nms-120R2")
include("structureblocklib-bukkit-core:bukkit-nms-120R3")
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ public enum Version {
/**
* Version 1.20.2 - 1.20.2.
*/
VERSION_1_20_R2("v1_20_R2", "1.20.2", 1.22);
VERSION_1_20_R2("v1_20_R2", "1.20.2", 1.202),

/**
* Version 1.20.3 - 1.20.4.
*/
VERSION_1_20_R3("v1_20_R3", "1.20.4", 1.203);

private final String bukkitId;
private final String id;
Expand Down
9 changes: 9 additions & 0 deletions structureblocklib-bukkit-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ tasks.register("pluginJar", Exec::class.java, ) {
targetJarFile,
targetJarFile
)
obsMapping = "$obsMapping && " + createCommand(
"1.20.4-R0.1-SNAPSHOT",
"com/github/shynixn/structureblocklib/bukkit/v1_20_R3",
file,
shadowJar,
targetJarFile,
targetJarFile
)

if (System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")) {
commandLine = listOf("cmd", "/c", obsMapping.replace("\$HOME", "%userprofile%"))
Expand Down Expand Up @@ -191,6 +199,7 @@ dependencies {
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-119R3"))
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R1"))
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R2"))
implementation(project(":structureblocklib-bukkit-core:bukkit-nms-120R3"))

compileOnly("org.spigotmc:spigot:1.14.4-R0.1-SNAPSHOT")
testCompile("org.spigotmc:spigot:1.12-R0.1-SNAPSHOT")
Expand Down
24 changes: 24 additions & 0 deletions structureblocklib-bukkit-core/bukkit-nms-120R3/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repositories {
maven(url = "https://libraries.minecraft.net")
}

dependencies {
// Dependencies of spigot mojang want to restrict usage to only Java 17. However, we do not care
// what they want because the general compatibility of this plugin is Java 8. The plugin
// guarantees that everything works during runtime. This error is a false positive.
components {
all {
allVariants {
attributes {
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 8)
}
}
}
}

implementation(project(":structureblocklib-api"))
implementation(project(":structureblocklib-core"))
implementation(project(":structureblocklib-bukkit-api"))
compileOnly("org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:remapped-mojang")
testCompile("org.spigotmc:spigot:1.20.4-R0.1-SNAPSHOT:remapped-mojang")
}
Loading

0 comments on commit 43891aa

Please sign in to comment.