Skip to content

jaxvanyang/tp-chat-cmd

Repository files navigation

icon

TP Chat Command

Stars Forks Issues Closed Closed PR Version Test Status Downloads

This is a simple client Fabric mod for Minecraft. It provides a command called /tpchat, which has a simlar syntax to the vanalia /tp command. You can use it to send clickable message to EVERY ONLINE PLAYER for teleporting. And it can be used to teleport between dimensions, e.g., overworld <-> nether.

screenshot

Usage

Syntax: /tpchat [<location>] [<description>].

Notice: You must have /tellraw command permission to execute this command. Because /tpchat is technically a wrapper command of /tellraw.

Examples:

  • /tpchat: Send a clickable message for teleporting to current location.

  • /tpchat x y z: Send a clickable message for teleporting to (x,y,z).

  • /tpchat ~ ~ ~ Hello, World!: Send a clickable message for teleporting to current location with a custom description.

Development

/tpchat is completely a client-side mod, because it is only a wrapper command of /tellraw. There's no need to installed it on server side. You can use it on any server as long as you have /tellraw command permission.

Actually, when you use /tpchat, something like this will be executed:

/tellraw @a ["<Player> ",{"text":"Nether (9 60 -2)","color":"green","underlined":true,"clickEvent":{"action":"run_command","value":"/execute in the_nether run tp 9 60 -2"}},": Hello, World!"]

Limitation

Because of dedicated server's packet size limit, /tpchat's description has a length limit. Details see Cannot send too long message to dedicated server · Issue #5 · jaxvanyang/tp-chat-cmd.

Acknowledgement

  • Fabric - Thanks for the wonderful framework, documents and community.
  • 得意黑 Smiley Sans - Thanks for the awesome font, it is used in the icon.
  • VueTorrent - Thanks for the README title template.