diff --git a/README.md b/README.md index 0019eab..bcbc1a8 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,11 @@ Maybe in future I will post an official API through github packages, but current ## Build -You need Maven and a jdk. +You need Maven with Github access and a jdk. +If you don't know how to give Github access to maven, check [this](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token). +If you don't know how to create a personal token, check [this](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). -- First, compile spigot with the BuildTools.jar and the '--remapped' argument. - You need to do it for a lot of minecraft version, starting from 1.17. - To get them all, just do the next step, an error message will tell you what minecraft version is missing. - (I will try to suppress this step in future) -- Use ``mvn clean package`` or ``mvn clean install`` at the root of the project to build ShopChest artefact. +- Use ``mvn clean install`` at the root of the project to build ShopChest artefact. - After the build succeeded, the ShopChest.jar is found in the ``/plugin/target/`` folder. ## Issues diff --git a/nms/all/nms-assembly.xml b/nms/all/nms-assembly.xml new file mode 100644 index 0000000..28b77f7 --- /dev/null +++ b/nms/all/nms-assembly.xml @@ -0,0 +1,20 @@ + + nms-assembly + + jar + + false + + + true + + de.epiceric:shopchest-nms-* + + + true + + + + \ No newline at end of file diff --git a/nms/all/pom.xml b/nms/all/pom.xml new file mode 100644 index 0000000..3e3981e --- /dev/null +++ b/nms/all/pom.xml @@ -0,0 +1,78 @@ + + + + shopchest-nms + de.epiceric + 1.0.0 + + 4.0.0 + + de.epiceric + shopchest-nms-all + 1.0.0 + + pom + + + false + + + + + + de.epiceric + shopchest-nms-interface + + + de.epiceric + shopchest-nms-reflection + + + de.epiceric + shopchest-nms-v1_17_R1 + + + de.epiceric + shopchest-nms-v1_17_R2 + + + de.epiceric + shopchest-nms-v1_18_R1 + + + de.epiceric + shopchest-nms-v1_18_R2 + + + de.epiceric + shopchest-nms-v1_19_R1 + + + + + + + maven-assembly-plugin + + + nms-assembly + package + + single + + + false + + nms-assembly.xml + + + + + + + + + + diff --git a/nms/interface/pom.xml b/nms/interface/pom.xml index 7e4da9f..bf0cab1 100644 --- a/nms/interface/pom.xml +++ b/nms/interface/pom.xml @@ -1,12 +1,11 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 diff --git a/nms/pom.xml b/nms/pom.xml new file mode 100644 index 0000000..5555d62 --- /dev/null +++ b/nms/pom.xml @@ -0,0 +1,123 @@ + + + + shopchest-parent + de.epiceric + 1.15.0-SNAPSHOT + + 4.0.0 + + shopchest-nms + 1.0.0 + pom + + + interface + reflection + v1_17_R1 + v1_17_R2 + v1_18_R1 + v1_18_R2 + v1_19_R1 + all + + + + + defaultVersion + + + + + + de.epiceric + shopchest-nms-interface + 1.0.0 + provided + + + de.epiceric + shopchest-nms-reflection + 1.0.0 + provided + + + de.epiceric + shopchest-nms-v1_17_R1 + 1.0.0 + provided + + + de.epiceric + shopchest-nms-v1_17_R2 + 1.0.0 + provided + + + de.epiceric + shopchest-nms-v1_18_R1 + 1.0.0 + provided + + + de.epiceric + shopchest-nms-v1_18_R2 + 1.0.0 + provided + + + de.epiceric + shopchest-nms-v1_19_R1 + 1.0.0 + provided + + + + + + + + + net.md-5 + specialsource-maven-plugin + + + package + + remap + + remap-obf + + org.spigotmc:minecraft-server:${spigot.version}:txt:maps-mojang + true + org.spigotmc:spigot:${spigot.version}:jar:remapped-mojang + + true + remapped-obf + + + + package + + remap + + remap-spigot + + + ${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar + + org.spigotmc:minecraft-server:${spigot.version}:csrg:maps-spigot + org.spigotmc:spigot:${spigot.version}:jar:remapped-obf + + + + + + + + + + + \ No newline at end of file diff --git a/nms/reflection/pom.xml b/nms/reflection/pom.xml index d279214..db56e62 100644 --- a/nms/reflection/pom.xml +++ b/nms/reflection/pom.xml @@ -1,12 +1,11 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 diff --git a/nms/v1_17_R1/pom.xml b/nms/v1_17_R1/pom.xml index a94f376..c1b065b 100644 --- a/nms/v1_17_R1/pom.xml +++ b/nms/v1_17_R1/pom.xml @@ -1,12 +1,11 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 diff --git a/nms/v1_17_1_R1/pom.xml b/nms/v1_17_R2/pom.xml similarity index 76% rename from nms/v1_17_1_R1/pom.xml rename to nms/v1_17_R2/pom.xml index a8caa33..6119bd3 100644 --- a/nms/v1_17_1_R1/pom.xml +++ b/nms/v1_17_R2/pom.xml @@ -1,16 +1,15 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 - shopchest-nms-v1_17_1_R1 + shopchest-nms-v1_17_R2 1.0.0 diff --git a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeArmorStandImpl.java b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeArmorStandImpl.java similarity index 98% rename from nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeArmorStandImpl.java rename to nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeArmorStandImpl.java index 4eebd1c..3952fa0 100644 --- a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeArmorStandImpl.java +++ b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeArmorStandImpl.java @@ -1,4 +1,4 @@ -package de.epiceric.shopchest.nms.v1_17_1_R1; +package de.epiceric.shopchest.nms.v1_17_R2; import de.epiceric.shopchest.nms.FakeArmorStand; import io.netty.buffer.Unpooled; diff --git a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeEntityImpl.java b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeEntityImpl.java similarity index 98% rename from nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeEntityImpl.java rename to nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeEntityImpl.java index f0a280f..066d5b4 100644 --- a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeEntityImpl.java +++ b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeEntityImpl.java @@ -1,4 +1,4 @@ -package de.epiceric.shopchest.nms.v1_17_1_R1; +package de.epiceric.shopchest.nms.v1_17_R2; import de.epiceric.shopchest.nms.FakeEntity; import net.minecraft.network.protocol.Packet; diff --git a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeItemImpl.java b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeItemImpl.java similarity index 97% rename from nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeItemImpl.java rename to nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeItemImpl.java index 6807965..d9a10fc 100644 --- a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/FakeItemImpl.java +++ b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/FakeItemImpl.java @@ -1,4 +1,4 @@ -package de.epiceric.shopchest.nms.v1_17_1_R1; +package de.epiceric.shopchest.nms.v1_17_R2; import de.epiceric.shopchest.nms.FakeItem; import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket; diff --git a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/PlatformImpl.java b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/PlatformImpl.java similarity index 92% rename from nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/PlatformImpl.java rename to nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/PlatformImpl.java index 5d41eb8..8daf575 100644 --- a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/PlatformImpl.java +++ b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/PlatformImpl.java @@ -1,4 +1,4 @@ -package de.epiceric.shopchest.nms.v1_17_1_R1; +package de.epiceric.shopchest.nms.v1_17_R2; import de.epiceric.shopchest.nms.FakeArmorStand; import de.epiceric.shopchest.nms.FakeItem; diff --git a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/TextComponentHelperImpl.java b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/TextComponentHelperImpl.java similarity index 91% rename from nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/TextComponentHelperImpl.java rename to nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/TextComponentHelperImpl.java index 90bc670..0ad6620 100644 --- a/nms/v1_17_1_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_1_R1/TextComponentHelperImpl.java +++ b/nms/v1_17_R2/src/main/java/de/epiceric/shopchest/nms/v1_17_R2/TextComponentHelperImpl.java @@ -1,4 +1,4 @@ -package de.epiceric.shopchest.nms.v1_17_1_R1; +package de.epiceric.shopchest.nms.v1_17_R2; import de.epiceric.shopchest.nms.TextComponentHelper; import net.minecraft.nbt.CompoundTag; diff --git a/nms/v1_18_R1/pom.xml b/nms/v1_18_R1/pom.xml index 2cecce9..9998e79 100644 --- a/nms/v1_18_R1/pom.xml +++ b/nms/v1_18_R1/pom.xml @@ -1,19 +1,17 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 shopchest-nms-v1_18_R1 1.0.0 - 1.18-R0.1-SNAPSHOT diff --git a/nms/v1_18_R2/pom.xml b/nms/v1_18_R2/pom.xml index 73e1080..a7c6082 100644 --- a/nms/v1_18_R2/pom.xml +++ b/nms/v1_18_R2/pom.xml @@ -1,19 +1,17 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 shopchest-nms-v1_18_R2 1.0.0 - 1.18.2-R0.1-SNAPSHOT diff --git a/nms/v1_19_R1/pom.xml b/nms/v1_19_R1/pom.xml index c8cac50..af864a5 100644 --- a/nms/v1_19_R1/pom.xml +++ b/nms/v1_19_R1/pom.xml @@ -1,19 +1,17 @@ - - shopchest-parent + shopchest-nms de.epiceric - 1.15.0-SNAPSHOT - ../../pom.xml + 1.0.0 4.0.0 shopchest-nms-v1_19_R1 1.0.0 - 1.19-R0.1-SNAPSHOT diff --git a/plugin/pom.xml b/plugin/pom.xml index ec000d6..5c2b33c 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -49,31 +49,7 @@ de.epiceric - shopchest-nms-interface - - - de.epiceric - shopchest-nms-reflection - - - de.epiceric - shopchest-nms-v1_17_R1 - - - de.epiceric - shopchest-nms-v1_17_1_R1 - - - de.epiceric - shopchest-nms-v1_18_R1 - - - de.epiceric - shopchest-nms-v1_18_R2 - - - de.epiceric - shopchest-nms-v1_19_R1 + shopchest-nms-all de.epiceric diff --git a/plugin/src/main/java/de/epiceric/shopchest/nms/PlatformLoader.java b/plugin/src/main/java/de/epiceric/shopchest/nms/PlatformLoader.java index 1c3ba34..6b683ce 100644 --- a/plugin/src/main/java/de/epiceric/shopchest/nms/PlatformLoader.java +++ b/plugin/src/main/java/de/epiceric/shopchest/nms/PlatformLoader.java @@ -61,7 +61,7 @@ public class PlatformLoader { case "acd6e6c27e5a0a9440afba70a96c27c9" -> // 1.17 (v1_17_R1) new de.epiceric.shopchest.nms.v1_17_R1.PlatformImpl(); case "f0e3dfc7390de285a4693518dd5bd126" -> // 1.17.1 (v1_17_R1) - new de.epiceric.shopchest.nms.v1_17_1_R1.PlatformImpl(); + new de.epiceric.shopchest.nms.v1_17_R2.PlatformImpl(); case "9e9fe6961a80f3e586c25601590b51ec", "20b026e774dbf715e40a0b2afe114792" -> // 1.18 ; 1.18.1 (v1_18_R1) new de.epiceric.shopchest.nms.v1_18_R1.PlatformImpl(); case "eaeedbff51b16ead3170906872fda334" -> // 1.18.2 (v1_18_R2) diff --git a/pom.xml b/pom.xml index 6771f65..b654621 100644 --- a/pom.xml +++ b/pom.xml @@ -12,16 +12,38 @@ common plugin - nms/interface - nms/reflection - nms/v1_17_R1 - nms/v1_17_1_R1 - nms/v1_18_R1 - nms/v1_18_R2 - nms/v1_19_R1 external + + + build-nms + + + buildNMS + + + + nms + + + + import-nms + + + !buildNMS + + + + + github + GitHub Packages + https://maven.pkg.github.com/Flowsqy/ShopChest + + + + + ShopChest https://www.spigotmc.org/resources/shopchest.11431/ A Bukkit plugin letting players create custom chest shops. @@ -45,13 +67,10 @@ - codemc-releases - https://repo.codemc.io/repository/maven-releases/ + github + GitHub Packages + https://maven.pkg.github.com/Flowsqy/ShopChest - - codemc-snapshots - https://repo.codemc.io/repository/maven-snapshots/ - @@ -63,11 +82,11 @@ 17 17 + + true + ShopChest - - - defaultVersion @@ -161,40 +180,16 @@ provided + + de.epiceric + shopchest-nms-all + 1.0.0 + de.epiceric shopchest-nms-interface 1.0.0 - - - de.epiceric - shopchest-nms-reflection - 1.0.0 - - - de.epiceric - shopchest-nms-v1_17_R1 - 1.0.0 - - - de.epiceric - shopchest-nms-v1_17_1_R1 - 1.0.0 - - - de.epiceric - shopchest-nms-v1_18_R1 - 1.0.0 - - - de.epiceric - shopchest-nms-v1_18_R2 - 1.0.0 - - - de.epiceric - shopchest-nms-v1_19_R1 - 1.0.0 + provided @@ -325,34 +320,10 @@ net.md-5 specialsource-maven-plugin 1.2.4 - - - package - - remap - - remap-obf - - org.spigotmc:minecraft-server:${spigot.version}:txt:maps-mojang - true - org.spigotmc:spigot:${spigot.version}:jar:remapped-mojang - true - remapped-obf - - - - package - - remap - - remap-spigot - - ${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar - org.spigotmc:minecraft-server:${spigot.version}:csrg:maps-spigot - org.spigotmc:spigot:${spigot.version}:jar:remapped-obf - - - + + + maven-assembly-plugin + 3.3.0