A Minecraft server-side mod that adds various teleportation related commands
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fixes to make the merged jar work with github actions, and more fixes!

+45 -35
+6 -4
.github/workflows/build.yml
··· 26 26 distribution: temurin 27 27 cache: 'gradle' 28 28 - name: build 29 - run: chmod +x ./gradlew && ./gradlew build && ./gradlew mergeJars 29 + run: chmod +x ./gradlew && ./gradlew build 30 + - name: merge jars 31 + run: ./gradlew mergeJars 30 32 - name: capture build artifacts 31 33 uses: actions/upload-artifact@v4 32 34 with: 33 - name: Artifacts 35 + name: teleport_commands-artifacts 34 36 path: | 35 - */build/libs 36 - */Merged 37 + **/build/libs/* 37 38 !buildSrc/ 38 39 !common/ 40 + compression-level: 9 39 41 if-no-files-found: error
+2 -2
.gitignore
··· 10 10 *.ipr 11 11 *.iws 12 12 *.iml 13 - .idea/* 13 + .idea 14 14 !.idea/scopes 15 15 16 16 # other 17 17 run 18 18 runs 19 - Merged 19 + merged 20 20 21 21 # java 22 22 hs_err_*.log
+11 -7
CHANGELOG.md
··· 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 7 8 8 ### [W.I.P] 9 - - Storage is loaded in memory instead of reading it again and again, Improves speed and IO usage, however there might be slightly higher memory usage. 10 - - Adding comments to a lot of code (W.I.P) 11 - - Made it so the DeathLocation (for `/back`) is only kept in memory 12 - - Improved the Storage classes and functions (I'm doing proper java, yipie) 13 - - Better error handling for command suggestions. 9 + - Storage is loaded in memory instead of reading it again and again, Improves speed and IO usage, however there might be slightly higher passive memory usage. 10 + - Added a new merged jar file that combines the jars of the mod-loaders into one. (Thanks to [forgix](https://github.com/PacifistMC/Forgix)!) (This will also from now on be published on Modrinth) 11 + - Made it so the DeathLocations (for `/back`) are only kept in memory. (before they would get saved and deleted on startup lol) 12 + - Improved the Storage classes and it's functions (I'm doing proper java, yipie) 13 + - Improved the error messages for command suggestions. 14 + - Improved the error handling for when a world isn't found (when going back, going home or warping). 15 + - It now throws a warning and gives the player a new error message (before it would give an incorrect `notFound` error) 16 + - Improved the sending of the homes/warps when doing `/home` or `/warps` (They now get sent in one message instead of multiple) 17 + - Reduced the size of the mod icon by 60% (a 40kb reduction) using some `zopflipng` black magic. (sadly this only made the mod jar 5kb smaller :<) 18 + - Removed the markdown for the translations from being bundled with the mod jar. 14 19 - Added hover effects for warp and homes text (W.I.P) 15 - - Throw a warning and an error message when the world isn't found (when going back, going home or warping), instead of giving an incorrect notFound error. 20 + - Added comments to a lot of code (W.I.P) 16 21 - Added a new `home.defaultNone` translation key for when there is no default house set. (before this would give `home.homeless` for some reason) 17 22 - Added a new `common.worldNotFound` translation key for when a world cannot be found 18 23 - Added a new `common.defaultPrompt` translation key for a new "Set Default" button for `/homes` 19 - - Made it so that when printing the homes or warps, they get sent in one go. 20 24 21 25 ### [v1.2.2] 22 26 - Handled a case where the client (geyser) will return the language as uppercase instead of lowercase.
+2 -1
README.md
··· 42 42 43 43 #### Improvements: 44 44 - [ ] Look into changing the mod into the more safe and sane kotlin (I love java) 45 - - [ ] Find a way to combine the mod loader specific jars into one 45 + - [ ] Add game tests 46 46 - [ ] Find the easiest way to backport the mod to older version (help) 47 47 - [ ] Create a config to add any delays and disable commands, with commands for operators in game 48 48 - [ ] Add a perm system 49 + - [x] Find a way to combine the mod loader specific jars into one 49 50 - [x] Json Storage automatic updater & cleaner 50 51 - [x] Modify /back to check if the location is safe and automatically choose a nearby location that is safe 51 52 - [x] Limit tpa requests for a player
+4 -3
build.gradle
··· 6 6 7 7 forgix { 8 8 group = "dev.mrsnowy.teleport_commands" 9 - mergedJarName = "${mod_id}-${minecraft_version}-${version}.jar" 9 + mergedJarName = "${mod_id}-${minecraft_version}-v${version}.jar" 10 + outputDir = "merged/build/libs" 10 11 11 12 // NeoForge Project Configuration 12 13 neoforge { ··· 15 16 // // Mixin configuration files (if applicable) 16 17 // mixin "${mod_id}.mixins.json" 17 18 // mixin "${mod_id}-forge.mixins.json" 18 - jarLocation = "build/libs/${mod_id}-neoforge-${minecraft_version}-${version}.jar" 19 + jarLocation = "build/libs/${mod_id}-neoforge-${minecraft_version}-v${version}.jar" 19 20 } 20 21 21 22 // Fabric Project Configuration 22 23 fabric { 23 24 projectName = "fabric" // Name of the Fabric subproject 24 25 25 - jarLocation = "build/libs/${mod_id}-fabric-${minecraft_version}-${version}.jar" 26 + jarLocation = "build/libs/${mod_id}-fabric-${minecraft_version}-v${version}.jar" 26 27 } 27 28 }
+11 -4
buildSrc/src/main/groovy/multiloader-common.gradle
··· 2 2 id 'java-library' 3 3 } 4 4 5 - base { 6 - archivesName = "${mod_id}-${project.name}-${minecraft_version}" 7 - } 5 + //base { 6 + // archivesName = "${mod_id}-${project.name}-${minecraft_version}" 7 + //} 8 8 9 9 java { 10 10 toolchain.languageVersion = JavaLanguageVersion.of(java_version) ··· 38 38 39 39 40 40 jar { 41 + // Makes it so it uses the archive name I specify 42 + archiveFileName.set("${mod_id}-${project.name}-${minecraft_version}-v${version}.jar") 43 + 44 + // Exclude some silly stuff to reduce size :3 45 + exclude "**/*.md" // Exclude all markdown files 46 + 47 + 41 48 from(rootProject.file("LICENSE")) { 42 - rename { "${it}_${mod_name}" } 49 + rename { "${it}-${mod_id}" } 43 50 } 44 51 45 52 manifest {
-11
buildSrc/src/main/groovy/multiloader-loader.gradle
··· 22 22 } 23 23 24 24 tasks.named('compileJava', JavaCompile) { 25 - doFirst { 26 - fileTree('src/main/java').matching { 27 - include 'path/to/TeleportCommands.java' 28 - }.each { File file -> 29 - def text = file.text 30 - text = text.replace('${version}', project.version.toString()) 31 - .replace('${mod_id}', mod_id.toString()) 32 - .replace('${mod_name}', mod_name.toString()) 33 - file.text = text 34 - } 35 - } 36 25 dependsOn(configurations.commonJava) 37 26 source(configurations.commonJava) 38 27 }
+1
common/src/main/java/dev/mrsnowy/teleport_commands/storage/configManager.java
··· 10 10 // Make config for setting max homes 11 11 // Make config that adds a delay between teleports and when fighting. (in teleport function?) 12 12 // Make config that automatically deletes namedLocations (warps/homes) with invalid world id's 13 + // Make config for setting the world_id for /worldspawn ? 13 14 }
common/src/main/resources/teleport_commands.png

This is a binary file and will not be displayed.

+5
fabric/build.gradle
··· 34 34 runDir("runs/server") 35 35 } 36 36 } 37 + } 38 + 39 + // Fix for fabric - makes it so it uses the archive name I specify 40 + tasks.named("remapJar") { 41 + archiveFileName.set("${mod_id}-${project.name}-${minecraft_version}-v${version}.jar") 37 42 }
+3 -3
neoforge/build.gradle
··· 23 23 programArgument '--nogui' 24 24 } 25 25 26 - gameTestServer { 27 - systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id 28 - } 26 + // gameTestServer { 27 + // systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id 28 + // } 29 29 30 30 // data { 31 31 // programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()