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

Disable Enderpearl Moving Box #4

Closed
Fredthedoggy opened this issue Mar 8, 2021 · 8 comments
Closed

Disable Enderpearl Moving Box #4

Fredthedoggy opened this issue Mar 8, 2021 · 8 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request in progress task is actively being worked on

Comments

@Fredthedoggy
Copy link

Description

Is your feature request related to a problem?

I've found a few issues with the ender pearl moving player's boxes, such as the fact that players will throw it first thing, then not have any wood or saplings to start from.

Describe the solution you'd like us to implement.

Make a setting for the ender pearl feature in /boxadmin settings

Describe alternatives you've considered.

None

Additional context

N/A

@tastybento
Copy link
Member

You could remove it from the blueprint.

@tastybento
Copy link
Member

I could also make the current setting cycle so it removes owner too.

@Fredthedoggy
Copy link
Author

I have removed it from the blueprint, but I would like to disable it as a feature aswell, as it can have irreversible consequences that people might not expect

@Fredthedoggy
Copy link
Author

I could also make the current setting cycle so it removes owner too.

Ah, that would be great.

@tastybento
Copy link
Member

Note that unless you plan to give out a lot of advancements, they may never be able to get out of the plains biome.

@Fredthedoggy
Copy link
Author

Ok, in that case, it would be nice if the following things could be implemented:
A Confirm button when you teleport your box, to say "Did you really mean to do that",
A Setting to disable it (if someone uses ender pearls a lot and finds it annoying)
and something that moves the island spawn point / visit point automatically if the box is relocated to somewhere that does not overlap with the current locations

@tastybento tastybento added the enhancement New feature or request label Mar 8, 2021
@BONNe
Copy link
Member

BONNe commented Apr 26, 2021

MOVE_BOX.setGameModes(Collections.singleton(this));
ALLOW_MOVE_BOX.setGameModes(Collections.singleton(this));
// Register protection flag with BentoBox
getPlugin().getFlagsManager().registerFlag(this, ALLOW_MOVE_BOX);
if (ALLOW_MOVE_BOX.isSetForWorld(getOverWorld())) {
getPlugin().getFlagsManager().registerFlag(this, MOVE_BOX);
} else {
getPlugin().getFlagsManager().unregister(MOVE_BOX);
}
// Register listeners
this.registerListener(new AdvancementListener(this));
this.registerListener(new EnderPearlListener(this));

@tastybento I do not think this is how you do it.

The check is done only onEnable, so how does it should work for changing the value?

I think you need a custom listener for checking ALLOW_MOVE_BOX value changing, and add/remove MOVE_BOX vaule.

Also, I am not sure if Island#isAllowed(FLAG, OWNER) will not return a false positive? How will it act on the flag that is unregistered? Will it return flags default value -> true, or false because flag does not exist?

@tastybento tastybento self-assigned this Apr 26, 2021
@tastybento tastybento added bug Something isn't working in progress task is actively being worked on labels Apr 26, 2021
@tastybento
Copy link
Member

Fixed and done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request in progress task is actively being worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants