BentoBoxWorld / IslandFly

Gives players the fly command
Eclipse Public License 2.0
3 stars 8 forks source link

The player can fly outside the island boundaries. #23

Closed myavuzokumus closed 4 years ago

myavuzokumus commented 5 years ago

Screenshots and videos

https://streamable.com/0pgb7

Server

Plugins

image

BentoBox setup

BentoBox and Addons

image

Extra:

Players cannot fly on the nether and end islands. Each time "Flying mode is turned on." says.

tastybento commented 5 years ago

I can't replicate this right now - it all seems to work.

Players who are Op or who have bskyblock.island.flybypass permission can fly outside the border. Maybe this player has this permission or a * permission of some kind?

myavuzokumus commented 5 years ago

No. Players do not have these permission.

tastybento commented 5 years ago

I need more info -

  1. Is the player a member of the island?
  2. Is it the owner or team member?
  3. What messages does the player see when they fly outside of the boundary? Please list all of them.
  4. What is the output of ‘/bsb info’ on the island and the output of ‘/bsb info playerName’

I may have to give you a debut build of the addon. Okay? It would probably be easiest.

myavuzokumus commented 5 years ago
  1. Yes
  2. Member
  3. Only said "You left the island." notification is coming.
  4. image

Ok.

Poslovitch commented 5 years ago

We would need that output in English though.

tastybento commented 5 years ago

I'll prepare a debug build that will tell us what is going on.

tastybento commented 5 years ago

IslandFly-1.7.0-SNAPSHOT-LOCAL.jar.zip Please try this and share the console log. Have the player exit the island like in the video and then share the log that results. Thanks!

myavuzokumus commented 5 years ago

image

tastybento commented 5 years ago

Thanks. Please try this version: IslandFly-1.7.0-SNAPSHOT-LOCAL.jar.zip

myavuzokumus commented 5 years ago

image image Another error message

BONNe commented 5 years ago

Does not relate to fly addon! Please create a separate issue in BentoBox repository.

tastybento commented 5 years ago

@OverBrave Ignore the error message - that is fixed in latest bentoBox build and unrelated.

In regards to the fly debug, let me check the sequence of events to confirm:

  1. You give xEnder permission to fly
  2. xEnder then exits the island boundary (jumps off the island and gets the leaving island message)
  3. xEnder then issues the /island fly command and is then able to fly outside the boundary
  4. xEnder then returns to the island

Question: it looks like your islands go right next to each other - correct? What is the island distance and island protection sizes?

(BTW, in future, please copy and paste text instead of screenshot - thanks!)

tastybento commented 5 years ago

BTW, if the above is true, then I expect the player is jumping over the island boundary check and then typing fly. IslandFly checks boundaries only when the player exits the island boundary and does not check continuously.

myavuzokumus commented 5 years ago

No. BSkyblock Config.;

distance-between-islands: 75 protection-range: 15

tastybento commented 5 years ago

Is this sequence correct though:

You give xEnder permission to fly Ender then exits the island boundary Ender then issues the /island fly command and is then able to fly outside the boundary Ender then returns to the island

myavuzokumus commented 5 years ago

Yes.

tastybento commented 5 years ago

Should be fixed now.

myavuzokumus commented 4 years ago

There's a problem. Can you check that out? Red text warns that it will close. The purple text indicates that the flying mode is back on. https://streamable.com/ycbs1

wellnesscookie commented 4 years ago

This is happening because IslandEvent.IslandExitEvent is triggered when leaving the range that is already set for your island, but if the distance between islands is not as same as range: Island is = addon.getIslands().getIslandAt(user.getLocation()).orElse(null); will still return the closest island, while it should return null (if user is beyond protection range).

I see no API that only checks if user is within a protection range of any island, and not only his own. public boolean userIsOnIsland(World world, User user) will only check for user's own island, but not for others as well. The problem now is that the IslandFly supports using fly command on other islands too.

myavuzokumus commented 4 years ago

But he can fly to another island and fly mode does not turn off. Anyway, when he enters another island, can you turn off the flight mode if the island doesn't belong to him?

wellnesscookie commented 4 years ago

The problem was of other nature. I opened a pull request that fixes it. Found the part of API I needed!

myavuzokumus commented 4 years ago

The latest update also is effective on op. #95 dev build

tastybento commented 4 years ago

Okay, so I should ignore Ops.

tastybento commented 4 years ago

Should be fixed now with latest build.