-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 (partial): other worlds can be used #136
fix (partial): other worlds can be used #136
Conversation
Currently, you can't create a warp in another world (even with permissions) as it goes into hasCorrectIslandRank. In this case, it is always false as there is no island at the block location meaning it will always go into this whilst creating a warp in other worlds.
Currently, `noLevelOrIsland and hasCorrectIslandRank` require the sign to be on an island. Currently this means the flag/level requirement are non-existent in the case of a sign being placed on a non-BSB island. This gives a possible solution if new API comes to light.
Thanks! Can you tell me more about what you think would be needed again? I didn't understand this part:
There seems to be some English missing there. If you had the last island something...? |
Lmao shit, I knew I stuffed up my explanation. Currently all the methods in getIslands all require a "world". We would require a method that doesn't require that but based off a UUID of a user only. |
Okay, and what would you get and what would you do with it? I can add API. |
The methods hasIslandRank and noLevelorIsland would instead use the new API which will look for their islands directly instead of looking for the island via the sign location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this check is fine as-is. The "setting warps in non-Island worlds" was a feature to make Warps available for admins who weren't even using BentoBox actually. So, the idea was that they would install BentoBox + Warps instead of the original Warps plugin. So, I don't think extra API is not needed really because in this use case there are no islands or ranks to check. Anyway, this is definitely mergable, so thanks!
After the creation of #117, the use of the setting
allow-in-other-worlds: true
has became redundant as it goes intohasCorrectIslandRank
. This will always be false as there is no island at the sign where the block is placed in another world that isn't an Island.This fixes this by adding a
inWorld
check, however it should be noted that this isn't a true fix.If we wanted to implement a true fix, we would require the island where the user was last owner/had flag permissions to create a warp is used, without using "world" in the method. Getting the last primary island might be the way to go but new API would be required in order to access this as there is no way to get the world in this case in non-BSB worlds. I have added a TODO as well to make sure this isn't lost whilst reading/understanding the code whilst posing a possible solution if new API comes to light.