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

Blocked Flag Combinations Configuration #2

Open
MithrandirCraft opened this issue Sep 10, 2021 · 2 comments
Open

Blocked Flag Combinations Configuration #2

MithrandirCraft opened this issue Sep 10, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@MithrandirCraft
Copy link

MithrandirCraft commented Sep 10, 2021

I'd really like flight flags to be incompatible with having pvp allowed flags in claims. Can I currently achieve this? Or could there be an option for both flags to cancel out?

Would also be nice if flight mode got optionally disabled when receiving potion, projectile or melee damage. Any kind of damage would also do if lazy.

I think these two optional measures together should be enough to fix pvp abuse with flying.

@akdukaan
Copy link
Owner

I think I could add something to the config where you can specify which claimflags can't be combined with other claimflags. It might take me a while since this is a somewhat larger feature request. The config would look something like this:

blocked-flag-combinations:
  set1:
    flags: [noenter, noenterplayer]
    max: 1 # you can only set at most 1 of these flags
  set2:
    flags: [allowpvp, allowflight]
    max: 1

For the second part, I'm not sure the best way to achieve that. When would you want the player to be able to fly again? Should they have to walk out of the claim and come back in? Wait a few seconds? The first feature you mentioned seems more feasible for this project right now.

From what I understand of each feature's description, either one of your two mentioned features should be enough to prevent people from flying while in pvp combat, right? Your last sentence makes it seem like you believe both features must be implemented.

@MithrandirCraft
Copy link
Author

MithrandirCraft commented Dec 18, 2021

I'm sorry I never answered this. We really still need a solution for this.

I think I could add something to the config where you can specify which claimflags can't be combined with other claimflags. It might take me a while since this is a somewhat larger feature request. The config would look something like this:

blocked-flag-combinations:
  set1:
    flags: [noenter, noenterplayer]
    max: 1 # you can only set at most 1 of these flags
  set2:
    flags: [allowpvp, allowflight]
    max: 1

Looks good! That would cover the first part.

From what I understand of each feature's description, either one of your two mentioned features should be enough to prevent people from flying while in pvp combat, right? Your last sentence makes it seem like you believe both features must be implemented.

I'd say we can live without the second part, but only if users within the claim get their flight disabled when removing a flight flag. This seems to be the best approach, since all you'd have to do is implement the configurable flag stacker blocker. But it also requires extra work for coding flight disabler on flight flag updates.

Otherwise they could remove allowflight while still flying and then set the allowpvp flag.
Else we would still need the second part to at least make it fair. Maybe flight should even get disabled on the second part, when inflicting damage.

That's one of the issues I can think of, that wouldn't get solved with only the flag approach.

Now, using only the second approach would also do it, but then we'd have to closely consider if flight would only get disabled when receiving, or also inflicting damage. If it's only receiving, it makes it a bit unfair for the player in disadvantage, which is the player that can't fly (I'd say it should be both, or at least more factors should be accounted for flight disabling). In my opinion, part 2 doesn't seem to be as clean as part 1.

soliddanii referenced this issue in soliddanii/GriefPreventionFlags Dec 30, 2021
@akdukaan akdukaan added the enhancement New feature or request label Mar 1, 2023
@akdukaan akdukaan changed the title [Suggestion] Accounting for pvp when flying Blocked Flag Combinations Configuration Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants