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.

Improvements and edits

+29 -21
+6 -4
README.md
··· 1 - # teleportCommands 1 + # Teleport Commands 2 2 3 3 A Minecraft fabric server-side mod that adds various teleportation related commands, like /home /tpa and /back 4 4 ··· 28 28 29 29 #### Planned commands: 30 30 - `/wild` - Teleports you to a random location in the Overworld 31 - - `/spawn or /worldspawn` - Teleports you to the worldspawn 32 - - `/bed or /spawn <dimension>` - Teleports you to your spawnpoint in a dimension, defaults to your current dimension 31 + - `/worldspawn` - Teleports you to the worldspawn 32 + - `/spawn <dimension>` - Teleports you to your spawnpoint in a dimension, defaults to your current dimension 33 33 34 34 #### Improvements: 35 35 - Modify /back to check if the location is safe and automatically choose a nearby location that is safe 36 36 - Create a config to add any delays and disable commands, also add commands for operators in game 37 + - Add translation file 38 + - Improve responses for commands 37 39 - Add a perm system 38 40 - Limit tpa requests for a player 39 - - Add Quilt support and maybe neoforge 41 + - Add Quilt support and maybe NeoForge
+1 -1
gradle.properties
··· 9 9 loader_version=0.15.9 10 10 11 11 # Mod Properties 12 - mod_version=1.0.1 12 + mod_version=1.0.2 13 13 maven_group=dev.mrsnowy.teleport_commands 14 14 archives_base_name=teleport_commands 15 15
+8 -8
src/main/java/dev/mrsnowy/teleport_commands/utils/tools.java
··· 21 21 private static ArrayList<tpaArrayClass> tpaList = new ArrayList<>(); 22 22 23 23 private static class tpaArrayClass { 24 - private ServerPlayerEntity InitPlayer; 25 - private ServerPlayerEntity RecPlayer; 24 + private String InitPlayer; 25 + private String RecPlayer; 26 26 private boolean here; 27 27 } 28 28 ··· 303 303 304 304 // Store da request 305 305 tpaArrayClass tpaRequest = new tpaArrayClass(); 306 - tpaRequest.InitPlayer = FromPlayer; 307 - tpaRequest.RecPlayer = ToPlayer; 306 + tpaRequest.InitPlayer = FromPlayer.getUuidAsString(); 307 + tpaRequest.RecPlayer = ToPlayer.getUuidAsString(); 308 308 tpaRequest.here = here; 309 309 tpaList.add(tpaRequest); 310 310 ··· 357 357 FromPlayer.sendMessage(Text.literal("No").formatted(Formatting.AQUA),true); 358 358 } else { 359 359 Optional<tpaArrayClass> tpaStorage = tpaList.stream() 360 - .filter(tpa -> Objects.equals(ToPlayer, tpa.InitPlayer)) 361 - .filter(tpa -> Objects.equals(FromPlayer, tpa.RecPlayer)) 360 + .filter(tpa -> Objects.equals(ToPlayer.getUuidAsString(), tpa.InitPlayer)) 361 + .filter(tpa -> Objects.equals(FromPlayer.getUuidAsString(), tpa.RecPlayer)) 362 362 .findFirst(); 363 363 364 364 if (tpaStorage.isPresent()) { ··· 386 386 FromPlayer.sendMessage(Text.literal("No").formatted(Formatting.AQUA),true); 387 387 } else { 388 388 Optional<tpaArrayClass> tpaStorage = tpaList.stream() 389 - .filter(tpa -> Objects.equals(ToPlayer, tpa.InitPlayer)) 390 - .filter(tpa -> Objects.equals(FromPlayer, tpa.RecPlayer)) 389 + .filter(tpa -> Objects.equals(ToPlayer.getUuidAsString(), tpa.InitPlayer)) 390 + .filter(tpa -> Objects.equals(FromPlayer.getUuidAsString(), tpa.RecPlayer)) 391 391 .findFirst(); 392 392 393 393 if (tpaStorage.isPresent()) {
src/main/resources/assets/teleport_commands/icon.png

This is a binary file and will not be displayed.

+14 -8
src/main/resources/fabric.mod.json
··· 3 3 "id": "teleport_commands", 4 4 "version": "${version}", 5 5 "name": "Teleport Commands", 6 - "description": "This is an example description! Tell everyone what your mod is about!", 6 + "description": "A fabric server-side mod that adds various teleportation related commands", 7 7 "authors": [ 8 - "Me!" 8 + "Mr. Snowy" 9 9 ], 10 10 "contact": { 11 - "homepage": "https://fabricmc.net/", 12 - "sources": "https://github.com/FabricMC/fabric-example-mod" 11 + "homepage": "https://mrsnowy.dev/", 12 + "sources": "https://github.com/MrSn0wy/TeleportCommands", 13 + "issues": "https://github.com/MrSn0wy/TeleportCommands/issues" 13 14 }, 14 - "license": "CC0-1.0", 15 + "license": "MIT", 15 16 "icon": "assets/teleport_commands/icon.png", 16 17 "environment": "*", 17 18 "entrypoints": { ··· 19 20 "dev.mrsnowy.teleport_commands.TeleportCommands" 20 21 ] 21 22 }, 23 + "custom": { 24 + "modmenu": { 25 + "links": { 26 + "modmenu.modrinth": "https://modrinth.com/mod/teleport-commands", 27 + "modmenu.kofi": "https://ko-fi.com/mr_snowy" 28 + } 29 + } 30 + }, 22 31 "depends": { 23 32 "fabricloader": ">=0.15.9", 24 33 "minecraft": "~1.20.4", 25 34 "java": ">=17", 26 35 "fabric-api": ">=0.97.0" 27 - }, 28 - "suggests": { 29 - "another-mod": "*" 30 36 } 31 37 }