Skip to content

Commit c1c9916

Browse files
JNNGLUserNuggethevav
authored
Release 1.1.17 (#123)
* Velocity 266+ support * 1.20.2 support * Automatically generate mappings --------- Co-authored-by: jnngl <jnngles@gmail.com> Co-authored-by: UserNugget <47762903+UserNugget@users.noreply.github.com> Co-authored-by: Petr Ilin <hevav@hevav.dev>
1 parent fe53873 commit c1c9916

41 files changed

Lines changed: 272362 additions & 361524 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/setup-java@v3.0.0
1919
with:
2020
distribution: adopt
21-
java-version: 11
21+
java-version: 17
2222
- name: Build LimboAPI
2323
run: ./gradlew build
2424
- name: Upload LimboAPI

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/setup-java@v3.0.0
1515
with:
1616
distribution: adopt
17-
java-version: 11
17+
java-version: 17
1818
- name: Build LimboAPI
1919
run: ./gradlew build
2020
- name: Upload LimboAPI

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Test server: [``ely.su``](https://hotmc.ru/minecraft-server-203216)
5353
<dependency>
5454
<groupId>net.elytrium.limboapi</groupId>
5555
<artifactId>api</artifactId>
56-
<version>1.1.16</version>
56+
<version>1.1.17</version>
5757
<scope>provided</scope>
5858
</dependency>
5959
</dependencies>
@@ -70,7 +70,7 @@ Test server: [``ely.su``](https://hotmc.ru/minecraft-server-203216)
7070
}
7171
7272
dependencies {
73-
compileOnly("net.elytrium.limboapi:api:1.1.16")
73+
compileOnly("net.elytrium.limboapi:api:1.1.17")
7474
}
7575
```
7676

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.16
1+
1.1.17

api/build.gradle

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ plugins {
55
id("maven-publish")
66
}
77

8-
dependencies {
8+
compileJava() {
9+
getOptions().getRelease().set(11)
10+
getOptions().setEncoding("UTF-8")
11+
}
12+
13+
dependencies() {
914
compileOnly("com.velocitypowered:velocity-api:$velocityVersion")
1015
api("net.elytrium.commons:config:$elytriumCommonsVersion")
1116
api("net.elytrium.commons:utils:$elytriumCommonsVersion")
@@ -14,44 +19,41 @@ dependencies {
1419
api("net.kyori:adventure-nbt:$adventureVersion")
1520

1621
compileOnly("com.github.spotbugs:spotbugs-annotations:$spotbugsVersion")
22+
23+
annotationProcessor("net.java.dev.jna:jna-platform:5.13.0")
24+
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:1.0.0")
1725
}
1826

19-
license {
27+
license() {
2028
matching(includes: ["**/mcprotocollib/**"]) {
21-
setHeader(getRootProject().file("HEADER_MCPROTOCOLLIB.txt"))
29+
header = rootProject.file("HEADER_MCPROTOCOLLIB.txt")
2230
}
2331

24-
setHeader(file("HEADER.txt"))
25-
}
26-
27-
task javadocJar(type: Jar) {
28-
getArchiveClassifier().set("javadoc")
29-
from(javadoc)
32+
header = file("HEADER.txt")
3033
}
3134

32-
javadoc {
33-
MinimalJavadocOptions options = getOptions()
35+
javadoc() {
3436
options.setEncoding("UTF-8")
35-
options.setCharSet("UTF-8")
36-
// Mark sources as Java 11 source compatible.
3737
options.setSource("11")
38-
options.links("https://docs.oracle.com/en/java/javase/11/docs/api/", "https://jd.adventure.kyori.net/nbt/4.11.0/")
39-
38+
options.links("https://docs.oracle.com/en/java/javase/11/docs/api/")
4039
options.addStringOption("Xdoclint:none", "-quiet")
41-
42-
// Remove "undefined" from search paths when generating javadoc for a non-modular project. (JDK-8215291)
43-
if (JavaVersion.current() == JavaVersion.VERSION_11) {
40+
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {
4441
options.addBooleanOption("-no-module-directories", true)
4542
}
4643
}
4744

48-
task sourcesJar(type: Jar) {
49-
getArchiveClassifier().set("sources")
45+
tasks.register("sourcesJar", Jar) {
46+
archiveClassifier = "sources"
5047
from(sourceSets.main.getAllSource())
5148
}
5249

53-
publishing {
54-
repositories {
50+
tasks.register("javadocJar", Jar) {
51+
archiveClassifier = "javadoc"
52+
from(javadoc)
53+
}
54+
55+
publishing() {
56+
repositories() {
5557
maven {
5658
credentials {
5759
setUsername(System.getenv("PUBLISH_USERNAME"))
@@ -63,22 +65,20 @@ publishing {
6365
}
6466
}
6567

66-
publications {
67-
maven(MavenPublication) {
68-
from(components.java)
68+
publications.create("publication", MavenPublication) {
69+
from(components.java)
6970

70-
artifact(javadocJar)
71-
artifact(sourcesJar)
72-
}
71+
artifact(javadocJar)
72+
artifact(sourcesJar)
7373
}
7474
}
7575

76-
artifacts {
76+
artifacts() {
7777
archives(javadocJar)
7878
archives(sourcesJar)
7979
}
8080

81-
sourceSets.main.getJava().srcDir(
81+
sourceSets.main.java.srcDir(
8282
getTasks().register("generateTemplates", Copy) {
8383
task -> {
8484
String version = getVersion().contains("-") ? "${getVersion()} (git-${getCurrentShortRevision()})" : getVersion()

api/src/main/java/net/elytrium/limboapi/api/LimboFactory.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,23 @@ public interface LimboFactory {
189189
*/
190190
PreparedPacket createPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion);
191191

192+
/**
193+
* Creates new prepared packet builder for the CONFIG state.
194+
*
195+
* @return new prepared packet.
196+
*/
197+
PreparedPacket createConfigPreparedPacket();
198+
199+
/**
200+
* Creates new prepared packet builder for the CONFIG state.
201+
*
202+
* @param minVersion Minimum version to prepare.
203+
* @param maxVersion Maximum version to prepare.
204+
*
205+
* @return new prepared packet.
206+
*/
207+
PreparedPacket createConfigPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion);
208+
192209
/**
193210
* Registers self-made packet.
194211
*

api/src/main/java/net/elytrium/limboapi/api/LimboSessionHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ default void onSpawn(Limbo server, LimboPlayer player) {
1515

1616
}
1717

18+
default void onConfig(Limbo server, LimboPlayer player) {
19+
20+
}
21+
1822
default void onMove(double posX, double posY, double posZ) {
1923

2024
}

build.gradle

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,55 @@
11
//file:noinspection GroovyAssignabilityCheck
22

3-
plugins {
3+
plugins() {
44
id("java")
5+
56
id("checkstyle")
6-
id("com.github.spotbugs").version("5.0.7").apply(false)
7+
id("com.github.spotbugs").version("5.0.14").apply(false)
78
id("org.cadixdev.licenser").version("0.6.1").apply(false)
89
}
910

10-
allprojects {
11+
allprojects() {
1112
apply(plugin: "checkstyle")
1213
apply(plugin: "com.github.spotbugs")
1314
apply(plugin: "org.cadixdev.licenser")
1415

1516
setGroup("net.elytrium.limboapi")
16-
setVersion("1.1.17-SNAPSHOT")
17-
18-
compileJava {
19-
getOptions().setEncoding("UTF-8")
20-
}
17+
setVersion("1.1.17")
2118

22-
java {
23-
setSourceCompatibility(JavaVersion.VERSION_11)
24-
setTargetCompatibility(JavaVersion.VERSION_11)
19+
compileJava() {
20+
sourceCompatibility = JavaVersion.VERSION_17
21+
targetCompatibility = JavaVersion.VERSION_17
2522
}
2623

27-
repositories {
24+
repositories() {
2825
mavenCentral()
2926

30-
maven {
27+
maven() {
3128
setName("elytrium-repo")
3229
setUrl("https://maven.elytrium.net/repo/")
3330
}
34-
maven {
31+
maven() {
3532
setName("papermc-repo")
3633
setUrl("https://papermc.io/repo/repository/maven-public/")
3734
}
3835
}
3936

40-
checkstyle {
41-
setToolVersion("10.3")
42-
setConfigFile(file("${this.getRootDir()}/config/checkstyle/checkstyle.xml"))
43-
setConfigProperties("configDirectory": "${this.getRootDir()}/config/checkstyle")
44-
setMaxErrors(0)
45-
setMaxWarnings(0)
37+
checkstyle() {
38+
toolVersion = "10.12.1"
39+
configFile = file("$rootDir/config/checkstyle/checkstyle.xml")
40+
configProperties = ["configDirectory": "$rootDir/config/checkstyle"]
41+
maxErrors = 0
42+
maxWarnings = 0
4643
}
4744

48-
spotbugs {
49-
setExcludeFilter(file("${this.getRootDir()}/config/spotbugs/suppressions.xml"))
50-
}
45+
spotbugs() {
46+
excludeFilter = file("${this.getRootDir()}/config/spotbugs/suppressions.xml")
5147

52-
spotbugsMain {
53-
reports {
54-
html {
55-
getRequired().set(true)
56-
getOutputLocation().set(file("${this.getBuildDir()}/reports/spotbugs/main/spotbugs.html"))
57-
setStylesheet("fancy-hist.xsl")
48+
if (this.project != rootProject) {
49+
reports.register("html") {
50+
required = true
51+
outputLocation.value(layout.buildDirectory.file("reports/spotbugs/main/spotbugs.html"))
52+
stylesheet = "fancy-hist.xsl"
5853
}
5954
}
6055
}

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
fastPrepareVersion=1.0.7
1+
org.gradle.jvmargs=-Xmx4096m
2+
fastPrepareVersion=1.0.8
23
velocityVersion=3.2.0-SNAPSHOT
34
nettyVersion=4.1.86.Final
45
fastutilVersion=8.5.11
56
bstatsVersion=3.0.0
67
spotbugsVersion=4.7.3
78
elytriumCommonsVersion=1.2.3
89
adventureVersion=4.12.0
10+
manifestUrl=https://launchermeta.mojang.com/mc/game/version_manifest.json

0 commit comments

Comments
 (0)