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.

[1.21.5] V1.3.1

Check the CHANGELOG.md for all the new changes!

+85 -67
+1
CHANGELOG.md
··· 6 6 7 7 ### [1.3.1] 8 8 - Updated Russian translations (Thanks to [rfin0](https://github.com/rfin0)!) 9 + - Changed the text color to red when running `/delhome` and the home isn't found. This is now consistent with `/delwarp` 9 10 10 11 ### [1.3.0] 11 12 #### Changed
+1 -1
buildSrc/src/main/groovy/multiloader-common.gradle
··· 92 92 "fabric_loom": fabric_loom, 93 93 "neoforge_version": neoforge_version, 94 94 "neoforge_loader_version_range": neoforge_loader_version_range, 95 - "NeoGradle": NeoGradle, 95 + // "NeoGradle": NeoGradle, 96 96 // "quilt_loader_version": quilt_loader_version, 97 97 // "quilt_fabric_api": quilt_fabric_api, 98 98 // "quilt_loom": quilt_loom,
+1 -1
common/src/main/java/dev/mrsnowy/teleport_commands/Constants.java
··· 6 6 public class Constants { 7 7 public static final String MOD_ID = "teleport_commands"; 8 8 public static final String MOD_NAME = "Teleport Commands"; 9 - public static final String VERSION = "1.3.0"; 9 + public static final String VERSION = "1.3.1"; 10 10 11 11 public static final Logger LOGGER = LoggerFactory.getLogger(MOD_NAME); 12 12 }
+1 -1
common/src/main/java/dev/mrsnowy/teleport_commands/commands/back.java
··· 115 115 .append("\n") 116 116 .append(getTranslatedText("commands.teleport_commands.common.forceTeleport", player) 117 117 .withStyle(ChatFormatting.DARK_AQUA, ChatFormatting.BOLD) 118 - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/back true"))) 118 + .withStyle(style -> style.withClickEvent(new ClickEvent.RunCommand("/back true"))) 119 119 ) 120 120 .append("\n"), false); 121 121 return;
+21 -23
common/src/main/java/dev/mrsnowy/teleport_commands/commands/home.java
··· 95 95 96 96 } catch (Exception e) { 97 97 Constants.LOGGER.error("Error while deleting a home! => ", e); 98 - player.displayClientMessage(getTranslatedText("commands.teleport_commands.home.deleteError", player).withStyle(ChatFormatting.RED, ChatFormatting.BOLD), true); 98 + player.displayClientMessage(getTranslatedText("commands.teleport_commands.home.deleteError", player) 99 + .withStyle(ChatFormatting.RED, ChatFormatting.BOLD), true); 99 100 return 1; 100 101 } 101 102 return 0; ··· 116 117 117 118 } catch (Exception e) { 118 119 Constants.LOGGER.error("Error while renaming a home! => ", e); 119 - player.displayClientMessage(getTranslatedText("commands.teleport_commands.home.renameError", player).withStyle(ChatFormatting.RED, ChatFormatting.BOLD), true); 120 + player.displayClientMessage(getTranslatedText("commands.teleport_commands.home.renameError", player) 121 + .withStyle(ChatFormatting.RED, ChatFormatting.BOLD), true); 120 122 return 1; 121 123 } 122 124 return 0; ··· 275 277 // Get the home from the player 276 278 Optional<NamedLocation> optionalHome = playerStorage.getHome(homeName); 277 279 if (optionalHome.isEmpty()) { 278 - player.displayClientMessage(getTranslatedText("commands.teleport_commands.home.notFound", player).withStyle(ChatFormatting.AQUA), true); 280 + player.displayClientMessage(getTranslatedText("commands.teleport_commands.home.notFound", player).withStyle(ChatFormatting.RED), true); 279 281 return; 280 282 } 281 283 ··· 417 419 .withStyle(ChatFormatting.LIGHT_PURPLE) 418 420 .withStyle(style -> 419 421 style.withClickEvent( 420 - new ClickEvent( 421 - ClickEvent.Action.COPY_TO_CLIPBOARD, 422 + new ClickEvent.CopyToClipboard( 422 423 String.format("X%d Y%d Z%d", currentHome.getX(), currentHome.getY(), currentHome.getZ()) 423 424 ) 424 425 ) 425 426 ) 426 427 .withStyle(style -> 427 - style.withHoverEvent(new HoverEvent( 428 - HoverEvent.Action.SHOW_TEXT, 429 - getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 430 - )) 428 + style.withHoverEvent( 429 + new HoverEvent.ShowText( 430 + getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 431 + ) 432 + ) 431 433 ) 432 434 ) 433 435 .append(Component.literal(dimension) 434 436 .withStyle(ChatFormatting.DARK_PURPLE) 435 437 .withStyle(style -> 436 438 style.withClickEvent( 437 - new ClickEvent( 438 - ClickEvent.Action.COPY_TO_CLIPBOARD, 439 + new ClickEvent.CopyToClipboard( 439 440 currentHome.getWorldString() 440 441 ) 441 442 ) 442 443 ) 443 444 .withStyle(style -> 444 - style.withHoverEvent(new HoverEvent( 445 - HoverEvent.Action.SHOW_TEXT, 446 - getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 447 - )) 445 + style.withHoverEvent( 446 + new HoverEvent.ShowText( 447 + getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 448 + ) 449 + ) 448 450 ) 449 451 ); 450 452 ··· 459 461 .withStyle(ChatFormatting.GREEN) 460 462 .withStyle(style -> 461 463 style.withClickEvent( 462 - new ClickEvent( 463 - ClickEvent.Action.RUN_COMMAND, 464 + new ClickEvent.RunCommand( 464 465 String.format("/home \"%s\"", currentHome.getName()) 465 466 ) 466 467 ) ··· 471 472 .withStyle(ChatFormatting.BLUE) 472 473 .withStyle(style -> 473 474 style.withClickEvent( 474 - new ClickEvent( 475 - ClickEvent.Action.SUGGEST_COMMAND, 475 + new ClickEvent.SuggestCommand( 476 476 String.format("/renamehome \"%s\" ", currentHome.getName()) 477 477 ) 478 478 ) ··· 486 486 .withStyle(ChatFormatting.DARK_AQUA) 487 487 .withStyle(style -> 488 488 style.withClickEvent( 489 - new ClickEvent( 490 - ClickEvent.Action.RUN_COMMAND, 489 + new ClickEvent.RunCommand( 491 490 String.format("/defaulthome \"%s\"", currentHome.getName()) 492 491 ) 493 492 ) ··· 500 499 .withStyle(ChatFormatting.RED) 501 500 .withStyle(style -> 502 501 style.withClickEvent( 503 - new ClickEvent( 504 - ClickEvent.Action.SUGGEST_COMMAND, 502 + new ClickEvent.SuggestCommand( 505 503 String.format("/delhome \"%s\"", currentHome.getName()) 506 504 ) 507 505 )
+20 -2
common/src/main/java/dev/mrsnowy/teleport_commands/commands/tpa.java
··· 140 140 141 141 ToPlayer.displayClientMessage(getTranslatedText("commands.teleport_commands.tpa.received", ToPlayer, Component.literal(hereText), Component.literal(ReceivedFromPlayer).withStyle(ChatFormatting.AQUA, ChatFormatting.BOLD)).withStyle(ChatFormatting.AQUA) 142 142 .append("\n") 143 - .append(getTranslatedText("commands.teleport_commands.tpa.accept", ToPlayer).withStyle(ChatFormatting.GREEN, ChatFormatting.BOLD).withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, String.format("/tpaaccept %s", ReceivedFromPlayer))))) 143 + .append(getTranslatedText("commands.teleport_commands.tpa.accept", ToPlayer) 144 + .withStyle(ChatFormatting.GREEN, ChatFormatting.BOLD) 145 + .withStyle(style -> style 146 + .withClickEvent( 147 + new ClickEvent.RunCommand( 148 + String.format("/tpaaccept %s", ReceivedFromPlayer) 149 + ) 150 + ) 151 + ) 152 + ) 144 153 .append(" ") 145 - .append(getTranslatedText("commands.teleport_commands.tpa.deny", ToPlayer).withStyle(ChatFormatting.RED, ChatFormatting.BOLD).withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, String.format("/tpadeny %s", ReceivedFromPlayer))))), 154 + .append(getTranslatedText("commands.teleport_commands.tpa.deny", ToPlayer) 155 + .withStyle(ChatFormatting.RED, ChatFormatting.BOLD) 156 + .withStyle(style -> style 157 + .withClickEvent( 158 + new ClickEvent.RunCommand( 159 + String.format("/tpadeny %s", ReceivedFromPlayer) 160 + ) 161 + ) 162 + ) 163 + ), 146 164 false 147 165 ); 148 166
+21 -20
common/src/main/java/dev/mrsnowy/teleport_commands/commands/warp.java
··· 284 284 .withStyle(ChatFormatting.LIGHT_PURPLE) 285 285 .withStyle(style -> 286 286 style.withClickEvent( 287 - new ClickEvent( 288 - ClickEvent.Action.COPY_TO_CLIPBOARD, 287 + new ClickEvent.CopyToClipboard( 289 288 String.format("X%d Y%d Z%d", currentWarp.getX(), currentWarp.getY(), currentWarp.getZ()) 290 289 ) 291 290 ) 292 291 ) 293 292 .withStyle(style -> 294 - style.withHoverEvent(new HoverEvent( 295 - HoverEvent.Action.SHOW_TEXT, 296 - getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 297 - )) 293 + style.withHoverEvent( 294 + new HoverEvent.ShowText( 295 + getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 296 + ) 297 + ) 298 298 ) 299 299 ) 300 300 .append(Component.literal(dimension) 301 301 .withStyle(ChatFormatting.DARK_PURPLE) 302 302 .withStyle(style -> 303 303 style.withClickEvent( 304 - new ClickEvent( 305 - ClickEvent.Action.COPY_TO_CLIPBOARD, 304 + new ClickEvent.CopyToClipboard( 306 305 currentWarp.getWorldString() 307 306 ) 308 307 ) 309 308 ) 310 309 .withStyle(style -> style 311 310 .withHoverEvent( 312 - new HoverEvent( 313 - HoverEvent.Action.SHOW_TEXT, 311 + new HoverEvent.ShowText( 314 312 getTranslatedText("commands.teleport_commands.common.hoverCopy", player) 315 313 ) 316 314 ) ··· 325 323 .append(getTranslatedText("commands.teleport_commands.common.tp", player) 326 324 .withStyle(ChatFormatting.GREEN) 327 325 .withStyle(style -> 328 - style.withClickEvent(new ClickEvent( 329 - ClickEvent.Action.RUN_COMMAND, 330 - String.format("/warp \"%s\"", currentWarp.getName()) 331 - )) 326 + style.withClickEvent( 327 + new ClickEvent.RunCommand( 328 + String.format("/warp \"%s\"", currentWarp.getName()) 329 + ) 330 + ) 332 331 ) 333 332 ) 334 333 .append(" "); ··· 338 337 message.append(getTranslatedText("commands.teleport_commands.common.rename", player) 339 338 .withStyle(ChatFormatting.BLUE) 340 339 .withStyle(style -> style 341 - .withClickEvent(new ClickEvent( 342 - ClickEvent.Action.SUGGEST_COMMAND, 343 - String.format("/renamewarp \"%s\" ", currentWarp.getName())) 340 + .withClickEvent( 341 + new ClickEvent.SuggestCommand( 342 + String.format("/renamewarp \"%s\" ", currentWarp.getName()) 343 + ) 344 344 ) 345 345 ) 346 346 ) ··· 348 348 .append(getTranslatedText("commands.teleport_commands.common.delete", player) 349 349 .withStyle(ChatFormatting.RED) 350 350 .withStyle(style -> style 351 - .withClickEvent(new ClickEvent( 352 - ClickEvent.Action.SUGGEST_COMMAND, 353 - String.format("/delwarp \"%s\"", currentWarp.getName())) 351 + .withClickEvent( 352 + new ClickEvent.SuggestCommand( 353 + String.format("/delwarp \"%s\"", currentWarp.getName()) 354 + ) 354 355 ) 355 356 ) 356 357 );
+4 -1
common/src/main/java/dev/mrsnowy/teleport_commands/commands/worldspawn.java
··· 94 94 .append("\n") 95 95 .append(getTranslatedText("commands.teleport_commands.common.forceTeleport", player) 96 96 .withStyle(ChatFormatting.DARK_AQUA, ChatFormatting.BOLD) 97 - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/worldspawn true"))) 97 + .withStyle(style -> style.withClickEvent( 98 + new ClickEvent.RunCommand("/worldspawn true") 99 + ) 100 + ) 98 101 ) 99 102 .append("\n"), false); 100 103 }
+12 -15
gradle.properties
··· 7 7 java_version=21 8 8 9 9 # Common 10 - minecraft_version=1.21.4 10 + minecraft_version=1.21.5 11 11 mod_name=Teleport Commands 12 12 mod_author=Mr. Snowy 13 13 mod_id=teleport_commands 14 14 license=MIT 15 15 credits=Mr. Snowy 16 16 description=A server-side mod that adds various teleportation related commands. 17 - minecraft_version_range=[1.21.4, 1.22] 17 + minecraft_version_range=[1.21.5, 1.22] 18 18 19 19 # see https://projects.neoforged.net/neoforged/neoform for new versions 20 - neo_form_version=1.21.4-20241203.161809 20 + neo_form_version=1.21.5-20250325.162830 21 21 22 22 # see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions 23 - parchment_minecraft=1.21.4 24 - parchment_version=2025.03.23 25 - 26 - # Fabric 27 - fabric_loader_version=0.16.9 28 - #fabric_api=0.97.0+1.20.4 23 + parchment_minecraft=1.21.5 24 + parchment_version=2025.04.19 29 25 30 26 # see https://fabricmc.net/develop/ for new versions 27 + fabric_loader_version=0.16.14 31 28 fabric_loom=1.10-SNAPSHOT 32 29 33 30 # Quilt (Currently disabled since fabric port works better) ··· 35 32 #quilt_fabric_api=9.0.0-alpha.8+0.97.0-1.20.4 36 33 #quilt_loom=1.6.7 37 34 38 - 39 35 # NeoForge 40 - neoforge_version=21.4.0-beta 41 - neoforge_loader_version_range=[2,) 42 - NeoGradle=7.0.171 43 - 36 + # see https://projects.neoforged.net/neoforged/neoforge for new versions 37 + neoforge_version=21.5.65-beta 38 + neoforge_loader_version_range=[4,) 39 + # see https://projects.neoforged.net/neoforged/neogradle for new versions 40 + #NeoGradle=7.0.184 44 41 # see https://projects.neoforged.net/neoforged/moddevgradle for new versions 45 - neoforge_moddevgradle=2.0.80 42 + neoforge_moddevgradle=2.0.87 46 43 47 44 # Gradle 48 45 org.gradle.jvmargs=-Xmx6G
+1 -1
neoforge/src/main/resources/META-INF/mods.toml
··· 17 17 [[dependencies.${mod_id}]] #optional 18 18 modId = "neoforge" #mandatory 19 19 type="required" #mandatory (Can be one of "required", "optional", "incompatible" or "discouraged") 20 - versionRange = "${neoforge_loader_version_range}" #mandatory 20 + versionRange = "[${neoforge_version},)" #mandatory 21 21 ordering = "NONE" # The order that this dependency should load in relation to your mod, required to be either 'BEFORE' or 'AFTER' if the dependency is not mandatory 22 22 side = "BOTH" # Side this dependency is applied on - 'BOTH', 'CLIENT' or 'SERVER' 23 23 [[dependencies.${mod_id}]]
+2 -2
neoforge/src/main/resources/META-INF/neoforge.mods.toml
··· 1 1 modLoader = "javafml" #mandatory 2 2 loaderVersion = "${neoforge_loader_version_range}" #mandatory 3 3 license = "${license}" # Review your options at https://choosealicense.com/. 4 - #issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional 4 + issueTrackerURL="https://github.com/MrSn0wy/TeleportCommands/issues" #optional 5 5 [[mods]] #mandatory 6 6 modId = "${mod_id}" #mandatory 7 7 version = "${version}" #mandatory 8 8 displayName = "${mod_name}" #mandatory 9 9 #updateJSONURL="https://change.me.example.invalid/updates.json" #optional (see https://docs.neoforged.net/docs/misc/updatechecker/) 10 - #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional (displayed in the mod UI) 10 + displayURL="https://github.com/MrSn0wy/TeleportCommands" #optional (displayed in the mod UI) 11 11 logoFile="${mod_id}.png" #optional 12 12 credits="${credits}" #optional 13 13 authors = "${mod_author}" #optional