Aelysium-Group / rusty-connector

A player and server connection manager for Velocity based Minecraft Networks!
GNU General Public License v3.0
77 stars 17 forks source link

Direct teleport #48

Closed TheDeafCreeper closed 10 months ago

TheDeafCreeper commented 11 months ago

Adds a /tp command that allows you to directly teleport to another player without a request (basically the same as EssentialsX /tp vs /tpa).

Main reason for this is to help when it comes to checking up on players triggering an anticheat, or just watching over players that you can't otherwise get to (like in a full minigame).

Currently I have it as part of the TPService (formally TPAService) since it seems like it would fit there, but it could also be separated out, there would just need to be some redundant code as I use the tpSendPlayer (formally tpaSendPlayer) function to actually teleport the player..

Also added the lang stuff, and change the more generic teleport messages to be under tp instead of tpa, you could probably even move the entire tpa branch under tp if you wanted to.

TheDeafCreeper commented 10 months ago

Note: This is also currently just toggled with dynamic_teleport, but could also be moved to it's own module inside of it. (I mostly just didn't feel like messing around with config stuff).

nathan-i-martin commented 10 months ago

How about instead of doing /tp, we have something like /tpa <username> force? where force is a permission-based parameter? Or maybe just have a permission command.tpa.bypassRequest? So that system admins can use /tpa and just instantly teleport to anybody without needing the request.

If it's defined as /tp, system admins may have the idea that stuff like /tp <x> <y> <z> is allowed when it isn't. I would rather properly implement a full version of /tp if I were to add that. Plus I generally just don't like overriding vanilla commands cause it's a shitty experience for sysadmins and staff to have to deal with clones.

I'd think that having something like a permission or new parameter would be better than adding a totally new command.

TheDeafCreeper commented 10 months ago

Forgot about teleporting to cords, I think I will replace it with the bypass perm then, main thing about the force parameter would probably be forgetting to include it and revealing yourself.

TheDeafCreeper commented 10 months ago

Alright should be converted to a permission, I have not tested it yet though so I'll update you when that's done.

TheDeafCreeper commented 10 months ago

Alright converted to 0.8.0, cannot test it at the moment though because it does not seem to compile due to an unrelated issue.

nathan-i-martin commented 10 months ago

As long as it works with the API changes, I'm happy. I just don't wanna merge something in via v0.7.0 and then have to scan through all it's code to make sure it works with v0.8.0. I'll let you know if I manage to get a working build today for you to test