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

Disable teleports while falling. #403

Closed
BONNe opened this issue Dec 19, 2018 · 9 comments
Closed

Disable teleports while falling. #403

BONNe opened this issue Dec 19, 2018 · 9 comments
Assignees
Labels
Type: Enhancement Improvement or modification which is usually a new feature.

Comments

@BONNe
Copy link
Member

BONNe commented Dec 19, 2018

Is your feature request related to a problem? Please describe.
For hardcore SkyBlock, if you fall into the void, then you must lose all. Unfortunately, currently, users can just write /is or /is go, to teleport back on the island. And if they put water under teleport point, they even will not die.

Describe the solution you'd like
Disable teleport commands ./is and ./is go, while a user is falling.

Describe alternatives you've considered
Use other plugins that block teleport.

@Poslovitch Poslovitch added the Type: Enhancement Improvement or modification which is usually a new feature. label Dec 19, 2018
@Poslovitch
Copy link
Member

That may be a setting in the config. Or it could also be a World Setting flag. What do you think about that?

@BONNe
Copy link
Member Author

BONNe commented Dec 24, 2018

For me, it is enough with setting in the config, but for others, it could be useful as the world setting flag, or even permission based.

@Poslovitch
Copy link
Member

Poslovitch commented Dec 27, 2018

I'll do this as a WORLD_SETTING flag then.

Might be doable using Player#getFallDistance().

Gonna have a look at this.

@Poslovitch
Copy link
Member

There is also this method: Player#isOnGround()... I will have to do some tests to find out which one's the best.

@BONNe
Copy link
Member Author

BONNe commented Dec 27, 2018

Just one thing:
Please, avoid disabling teleport, if a player is sneaking (shift) over block edge.

It is annoying when you cannot teleport if you are over the block edge and holding shift, as it was implemented in other plugins.

Teleport should not be allowed only if a player is falling. :)

@Poslovitch
Copy link
Member

I think it is mostly due to the methods Spigot is providing us. Plugins may be using Player#isOnGround(), which may be causing this "bug". Player#getFallDistance() might then be a better choice.

@BONNe
Copy link
Member Author

BONNe commented Dec 27, 2018

Now, if the flag is enabled, the players cannot use /is home (go) command when falling.

But how about going to a different world? Will going to a different world and then returning prevent a user from falling in the void?

@Poslovitch
Copy link
Member

@BONNe Let's discuss of that in the PR instead.

@Poslovitch
Copy link
Member

Just merged the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improvement or modification which is usually a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants