-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fix: Player got falling damage when dismount #61
base: master
Are you sure you want to change the base?
Conversation
The To make it callable, like "safeDismount(Player player)" or something |
Some other bug that: It's very rare to happen this but sometimes the async cancel method may not trigger.
|
The code is simple to follow |
To be honest, I do not like to create another list with players because this increases the risk of "forgetting" something when mounting/dismounting/..., but if it is implemented in the right place, it could be done and I'd be okay with it. You just need to make sure that it does not lead to problems. |
So we now don't use I later do the coding. |
But as I said, this won't work out that easily...
|
This time I use async method to do this:
first I set player invulnerable to true, this can avoid damage for the player.
then use async method to set invulnerable to false after 3 second,
this should enough for him to fall.
A event listener solution certainly better than "invulnerable hack",
but that have too much job to do.
For me, I feel not good when your magic without comment everywhere.
The thing is, when you try to do same things but use method different than
"Bukkit new developer tutorial & guide", as your personal style...
or even just use some API, I, or the after contributors, are not here to DECOMPILE your code.
If now I want to implement the "on demand event listen" solution instead of "invulnerable hack",
I need to know where to put my "traveling player array".
So I start read code from main method and one line after another,
to figure out where are you placing similar things.
In this process, I don't want to care about how exactly the code to implement human design.
Just like any "HelloWorld" program that doesn't need to care about how the graphic card and HDMI protocol or anything else to work.
So I need the "green things"(comment) says "Oh here I do some stuff because I want to...", "The process to dismount player: one two three four five", "I put these variable here because..."
By read the green things I can fast a lot to know if a new things join in, where to put it,
or if I want to edit something, where to find.
OK yet, I know how bad is "tell the open source author you should do things like this".
Just my two cents about somebody is can't even understand what happened in "onLoad" method.
Sometimes, for better OTHER human readable, I even NOT to simplify
to