BetterRTP icon indicating copy to clipboard operation
BetterRTP copied to clipboard

First Join RTP Save Location

Open roracle opened this issue 2 years ago • 4 comments

Plugin Version: 3.6.10

Request: An option with the "First join RTP" settings that allow us to save the location of that player and reference it with a placeholder, such as %betterrtp_player_spawn%. This way using other plugins, we can alias a teleport command with /spawn to execute /tp %player% %betterrtp_player_spawn% OR a built-in /spawn command override that automatically sends them to their first spawn location.

How/Why: To allow servers a way to hedge against griefers in their creative worlds.

Additional Context: No additional context, but I love this plugin :)

roracle avatar Jun 20 '23 15:06 roracle

Correct way:

Make your plugin use RTP_TeleportPostEvent and save that location only once. Ignore subsequent RTPs by that player.

Hacky/incorrect way:

Set the following settings

  RtpOnFirstJoin: # Will execute as console to override delays
    Enabled: true # Make the player rtp when joining the server for the first time
    # Doesn't matter for this :: World: world # World to first rtp in
    # Doesn't matter for this :: SetAsRespawn: true # Save this first rtp as players new spawn point

Now use the player join event on priority MONITOR and get the player's location. Save it.

TechnicallyCoded avatar Jun 24 '23 11:06 TechnicallyCoded

Avoid placeholders for transmitting data at all costs.

TechnicallyCoded avatar Jun 24 '23 11:06 TechnicallyCoded

Correct way:

Make your plugin use RTP_TeleportPostEvent and save that location only once. Ignore subsequent RTPs by that player.

Hacky/incorrect way:

Set the following settings

  RtpOnFirstJoin: # Will execute as console to override delays
    Enabled: true # Make the player rtp when joining the server for the first time
    # Doesn't matter for this :: World: world # World to first rtp in
    # Doesn't matter for this :: SetAsRespawn: true # Save this first rtp as players new spawn point

Now use the player join event on priority MONITOR and get the player's location. Save it.

I have no idea what you mean by some of this but I can infer. I don't know how to do plugins, but I'm great at bug reports, suggestions, etc. lol

It would be a nice addition. If I knew how I would make it. Sounds like it would be simple enough, but I wouldn't know where to start.

roracle avatar Jun 24 '23 20:06 roracle

Correct way:

Make your plugin use RTP_TeleportPostEvent and save that location only once. Ignore subsequent RTPs by that player.

Hacky/incorrect way:

Set the following settings

  RtpOnFirstJoin: # Will execute as console to override delays
    Enabled: true # Make the player rtp when joining the server for the first time
    # Doesn't matter for this :: World: world # World to first rtp in
    # Doesn't matter for this :: SetAsRespawn: true # Save this first rtp as players new spawn point

Now use the player join event on priority MONITOR and get the player's location. Save it.

This reminds me, I should change the way this get triggered, instead of having Minecraft save player data as some servers might delete this kinda data. BetterRTP should save its self if its seen a player before, else teleport them for the first time.

SuperRonanCraft avatar Nov 10 '23 18:11 SuperRonanCraft