Hey guys - big update today.
In summary:
- /tpc - Cancels your teleport
- /tpb - Teleports you back to your previous location
- /tphere - Teleports someone to you
- There is now a warning if you're using an outdated config
- Teleporting is now blocked if someone takes damage
/tpc
So cancelling your teleport is in (finally). Here's how it works at the moment:
If you have sent someone a teleport request, which they have not accepted, and you then cancel the request, then your economics will be refunded, you will not have a cooldown, and a use will not be taken up.
If you have sent someone a teleport request which they have accepted, and you then cancel the request, then your economics currency will not be refunded, your teleport will go on cooldown, and a use will be taken.
This is definitely subject to change. Please let me know your thoughts on this and I'll edit functionality accordingly.
This is also in the GUI now. You'll see a nice orange cancel button if you have permission to use the command, but it'll appear grey if you don't have a request or teleport to cancel.
Permission: teleportgui.tpcancel
/tpb
You can now teleport back to your previous location. This is intended to be admin only, it doesn't have a cooldown, cost, or time before teleport etc, it just instantly teleports you back to where you were. I can definitely change this in the future if that's what you guys would like, but I figured it's better to push it out now as it so you have something to use.
This is also in the GUI, a nice blue button in the top right next to the cancel one, it will only show if you have permission to use it. It'll also show grey if you have the permission but don't have any previously recorded teleports.
Bear in mind that the previous teleports are forgotten on restart/on reload. Permission: teleportgui.tpback
/tphere
Does what it says on the tin. Not currently in the GUI since it would take precious space of players' name areas, but I will add it in if you guys use it enough. This is also intended to be admin only for the moment - it will instantly teleport them, with no cooldown, uses, economy charge etc.
Permission: teleportgui.tphere
Since many of you have been having issues with the plugin failing to read non-existent config values after updating the plugin but not regenerating the config (this is not your fault, just how Oxide works), I have added a new failsafe to this system. If the plugin tries to read a config value which doesn't exist it will warn you in the console with a message. If you see this message, simply rename your config file to "TeleportGUI-old" or something similar, reload the plugin, and manually transfer your custom settings back into the newly generated config. Hopefully this should make it more obvious when there's an issue with your config.
Teleporting is now blocked if you're in the 'time-until-teleport' process and take damage. There's a config option to disable this if you wish - it's enabled by default. Let me know your thoughts on this, nobody's suggested it but I figured it'd be a good addition (options are never bad, right?).
While I was adding in the new buttons I noticed the accept/deny buttons were hilariously huge (especially on the larger GUI) so I've toned them down a bit. I've also made the "request from" text a bit smaller in order to fit the new buttons in.
I've attached a screenshot of the small UI so you can take a look and see what it looks like ingame.
I also added a few things behind the scenes to make it easier to work on the plugin - don't worry, this won't affect your servers (it will only work on mine) - but it should make developing a little easier and faster.
If you happen to find some of the commands I've added, please don't try to fuck with them. You shouldn't be able to use them but if you do that's on you and I won't be helping you with any issues you may run into.
If you've got any questions about this fairly big update then the support thread is as alive as usual and I'll try to get in contact with you there.