yannicklamprecht / WorldBorderAPI

A world border api that allows it to define a world border per player
MIT License
125 stars 13 forks source link

isInBounds condition doesn't work #71

Closed UsainSrht closed 2 years ago

UsainSrht commented 2 years ago

Describe the bug isInBounds condition return true when you're not

To Reproduce lerp the player's border use isInBounds condition

Expected behavior return false when outside

https://user-images.githubusercontent.com/59025999/146036813-50f4f90a-5d4a-4779-b19b-59ccc115beec.mp4

booleans in the chat is isInBounds condition of player's location

Additional context May be you can add your own damage system to the API??? It would be awesome

yannicklamprecht commented 2 years ago

Thanks for your report, it is now deprecated and marked for removal in 1.20.

UsainSrht commented 2 years ago

Thanks for your report, it is now deprecated and marked for removal in 1.20.

Okay but how can I give damage to the players who are outside of the border?

yannicklamprecht commented 2 years ago

As already said in #59 you need to handle the calculation yourself.

UsainSrht commented 2 years ago

As already said in #59 you need to handle the calculation yourself.

Yes, but I've tried to handle you can see in the video but isInBounds return true even if you're outside how can I do the calculation?

yannicklamprecht commented 2 years ago

As already said in #59 you need to handle the calculation yourself.

Yes, but I've tried to handle you can see in the video but isInBounds return true even if you're outside how can I do the calculation?

You're shrinking the border. No my problem. Methods are deprecated now.

The persistence in the Player was only intended to easily apply the previously set player border when rejoining.

Your use case isn't covered by this api. You need to interpolate the stuff yourself.

old_size - ( ((old_size - new_size) / max_time) * time_passed)