Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable fly status saving. #1036

Closed
Mabus13 opened this issue Dec 21, 2016 · 12 comments
Closed

Add option to disable fly status saving. #1036

Mabus13 opened this issue Dec 21, 2016 · 12 comments

Comments

@Mabus13
Copy link

Mabus13 commented Dec 21, 2016

What behaviour is observed:

Fly status saved. But I not need it.

What behaviour is expected:

I want use /fly playername. And after exit and in playername he must not have fly.

AuthMe build number:

1492

@sgdc3 sgdc3 changed the title Fly enabled saving. Add option to disable fly status saving. Dec 21, 2016
@Mabus13
Copy link
Author

Mabus13 commented Dec 24, 2016

Thank you, and wait version with that feature. ^_^ You guys the best!

@Mabus13
Copy link
Author

Mabus13 commented Jan 2, 2017

Up. =) Hope you make possible off saving soon. ^_^

@ljacqu
Copy link
Member

ljacqu commented Jan 2, 2017

Wouldn't this solve it? In commands.yml:

onLogin:
    noFly:
        command: 'fly %p off'
        executor: 'CONSOLE'

@Mabus13
Copy link
Author

Mabus13 commented Jan 2, 2017

I will try it. Thank you. =)

@ljacqu
Copy link
Member

ljacqu commented Jan 2, 2017

Thanks, I look forward to your response :)

@Mabus13
Copy link
Author

Mabus13 commented Jan 2, 2017

Yes it help, but now all users when in be saw msg about disabling fly.... It can be anoying but anyway for tempoary solution it excelente! THANK YOU again.
Anyway in best way can add useability to control saving or not fly, op and speed statuses...

@Mabus13
Copy link
Author

Mabus13 commented Jan 2, 2017

Also it saved in files, when i have SQL... files.... when have sql.... ohhh it realy anoying.

@ljacqu ljacqu added this to the 5.3 milestone Mar 7, 2017
@ljacqu ljacqu self-assigned this Mar 7, 2017
@ljacqu
Copy link
Member

ljacqu commented Mar 7, 2017

(alphabetically) hi @DNx5 @Gnat008 @Eufranio @Mabus13 @sgdc3 @Twonox, pardon the disturbance.

As said in #1113 I think we can make it configurable how each property on the limbo player should be handled. I would be very thankful for naming suggestions and guidance on what is useful for plugin users.

I propose something like this:

limbo:
  # Options: RESTORE = keep fly status, DISABLE = always disable, ENABLE = always enable
  flyStatus: RESTORE
  # Options: RESTORE = keep to current value, DEFAULT = reset to default
  flySpeed: RESTORE
  # Options: RESTORE = keep to current value, DEFAULT = reset to default
  walkSpeed: RESTORE

@sgdc3
Copy link
Member

sgdc3 commented Mar 8, 2017

sounds good

@ljacqu
Copy link
Member

ljacqu commented Mar 20, 2017

Hi @Mabus13 , this is now available with build n. 1611 and above — http://ci.xephi.fr/job/AuthMeReloaded/
Once you start the plugin new options will appear in your config.yml:

limbo:
    # [...]
    # Whether the player is allowed to fly: RESTORE, ENABLE, DISABLE.
    # RESTORE sets back the old property from the player.
    restoreAllowFlight: 'RESTORE'
    # Restore fly speed: RESTORE, DEFAULT, MAX_RESTORE, RESTORE_NO_ZERO.
    # RESTORE: restore the speed the player had;
    # DEFAULT: always set to default speed;
    # MAX_RESTORE: take the maximum of the player's current speed and the previous one
    # RESTORE_NO_ZERO: Like 'restore' but sets speed to default if the player's speed was 0
    restoreFlySpeed: 'MAX_RESTORE'
    # Restore walk speed: RESTORE, DEFAULT, MAX_RESTORE, RESTORE_NO_ZERO.
    # See above for a description of the values.
    restoreWalkSpeed: 'MAX_RESTORE'

Could I ask you to give us some quick feedback whether this corresponds to your expectations or if there's still something that we should do?

@Twonox
Copy link
Contributor

Twonox commented Mar 23, 2017

These settings work fine !

  restoreFlySpeed: ''
  restoreWalkSpeed: ''

But I don't understand the utility of MAX_RESTORE

Why there is still:

        # Should not authenticated players have speed = 0?
        # This will reset the fly/walk speed to default value after the login.
        removeSpeed: false

restoreAllowFlight: 'RESTORE'
This setting doesn't restore our air position, we are directly on ground on login.

@ljacqu
Copy link
Member

ljacqu commented Mar 23, 2017

utility of MAX_RESTORE

When a player joins a server we put him into limbo until he is logged in. In that limbo state, certain properties like fly speed, OP status are removed from the player and stored elsewhere (in a so-called limbo player). Once a player logs in, we take the limbo player and copy over the properties back to the player (so we take the fly speed, OP status etc. from that limbo player and set them to the player).

Now, what happens by default if a non-logged in player is opped or his fly speed is changed is that these changes will be lost again, because we will take over whatever values we have from the limbo player and put them back to the player. Restoring values with MAX_RESTORE tries to fix the issue by taking the maximum speed. It's not a foolproof solution but might be sufficient for most situations.

why there is still restoreAllowFlight

I think some confusion is happening here; I think it's quite tricky to keep the player at that place in the air where he was. This is another issue, namely #1124. I'm curious how this will be solved.
However, I agree with you 100% that this setting is no longer needed. Now this can be configured with the new options; I will remove it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants