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

Ability to Whitelist Worlds for Addon Commands #1673

Open
meowsome opened this issue Feb 3, 2021 · 3 comments
Open

Ability to Whitelist Worlds for Addon Commands #1673

meowsome opened this issue Feb 3, 2021 · 3 comments
Assignees
Labels
Status: In progress Working on the issue. Type: Enhancement Improvement or modification which is usually a new feature.
Milestone

Comments

@meowsome
Copy link

meowsome commented Feb 3, 2021

Description

Is your feature request related to a problem?

I have multiple worlds on my server using BentoBox: SkyBlock_Islands, SkyBlock_Islands_nether, SkyBlock_Islands_the_end, and SkyBlock_spawn. When typing commands for addons such as Bank, Biomes, Challenges, Level, Likes, and Warps when a player is in a world other than the islands world, such as the spawn world, it gives the error "You are not in the right world to do this". This is expected because I specified the BSkyblock world as the island world (SkyBlock_Islands) and not the spawn world (SkyBlock_spawn).

Describe the solution you'd like us to implement.

I would like an option to be able to specify worlds where players can use addon commands outside of the island world. This would still affect their island like normal, but they can just access them anywhere for convenience. For example, when buying things in another world, it's inconvenient for players to have to teleport back to their island to view their bank balance and then back to the shop for buy.

Describe alternatives you've considered.

I could use MyCommand to create custom commands, but having a built-in feature would be much easier.
I could also just put my spawn in the islands world, but I already have it set up this way and would prefer to keep it.

Additional context

N/A

Please let me know if I am forgetting anything, I apologize if I did anything wrong.

@Poslovitch Poslovitch added Type: Enhancement Improvement or modification which is usually a new feature. Status: Pending Waiting for a developer to start working on this issue. labels Feb 7, 2021
@Poslovitch Poslovitch self-assigned this Feb 7, 2021
@Poslovitch Poslovitch added this to the 1.16.0 - Home sweet home... milestone Feb 7, 2021
tastybento added a commit that referenced this issue Feb 15, 2021
Panel API did not have this context so commands had to force players to
be in the world that the command used. These changes add the world
context to the PanelBuilder and changes the settings panels to use it.
Players and admins can now run settings commands in any world.

#1673
@tastybento
Copy link
Member

tastybento commented Feb 15, 2021

Yeah, this is tricky. The reason for the world limiting was more to do with underlying code limitations. Indeed, the ideal goal would be that you can use any command in any world and BentoBox will understand what you mean by the context, e.g. commands using the /island command should refer to the BSkyBlock world. The issue is that this context is not always passed through the whole code flow and instead the user's location is used. So, before any feature that enables commands to run outside of the world, we need enable run-anywhere commands. This will require the following:

  • Step 1 - enable the underlying Panel API to have the command context of which game mode initiated the GUI. This will apply the changes made by clicking on the GUI to the island or world that the command referred to and not the user's world. Make sure that it's all backwards compatible.
  • Step 2 - change the BentoBox admin and user settings commands so they don't check for world and work globally.
  • Step 3 - go through the addons one by one and use the new API and remove assumptions around user locations.
  • Step 4 - add some kind of global filtering system to allow/prevent usage of global commands per this ticket.

It might not be possible to get to Step 4, but I have a PR for Step 1/2 and Step 3 should be possible once the BentoBox API is updated.

@meowsome
Copy link
Author

Ah okay, I definitely appreciate you looking into this, it sounds like a lot of work, thank you.

@tastybento
Copy link
Member

It's somewhat overdue. I think what I've done is safe to include in 1.16.0 and will enable Step 3 of the process.

tastybento added a commit that referenced this issue Feb 16, 2021
…1682)

Panel API did not have this context so commands had to force players to
be in the world that the command used. These changes add the world
context to the PanelBuilder and changes the settings panels to use it.
Players and admins can now run settings commands in any world.

#1673
@tastybento tastybento assigned tastybento and unassigned Poslovitch Feb 16, 2021
@tastybento tastybento added Status: In progress Working on the issue. and removed Status: Pending Waiting for a developer to start working on this issue. labels Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In progress Working on the issue. Type: Enhancement Improvement or modification which is usually a new feature.
Projects
Development

No branches or pull requests

3 participants