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

Allow specific luckperms contexts to be disabled #5898

Merged
merged 4 commits into from
May 8, 2022

Conversation

Warriorrrr
Copy link
Member

Description:


New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@Warriorrrr Warriorrrr added this to the 0.98.2.0 milestone May 7, 2022
@Warriorrrr Warriorrrr marked this pull request as ready for review May 7, 2022 13:09
@NeumimTo
Copy link

NeumimTo commented May 7, 2022

	registerContext("towny:town", resident -> resident.hasTown() ? Collections.singleton(resident.getTownOrNull().getName()) : Collections.emptyList(), () -> TownyUniverse.getInstance().getTowns().stream().map(Town::getName).collect(Collectors.toSet()));
	registerContext("towny:town", resident -> resident.hasNation() ? Collections.singleton(resident.getNationOrNull().getName()) : Collections.emptyList(), () -> TownyUniverse.getInstance().getNations().stream().map(Nation::getName).collect(Collectors.toSet()));

You are registering same context twice, second one should be towny:nation

@Warriorrrr
Copy link
Member Author

Fixed, thanks

@LlmDl LlmDl merged commit 1232f0c into master May 8, 2022
@LlmDl LlmDl deleted the feature/configurable-contexts branch May 8, 2022 11:48
LlmDl added a commit that referenced this pull request May 8, 2022
Warriorrrr with PR #5898.
  - New Config Option: plugin.interfacing.enabled_contexts
    - Default: "*"
    - Configure what contexts to enable/disable here, contexts must be
separated by a comma.
    - Available contexts: towny:resident, towny:mayor, towny:king,
towny:insidetown, towny:insideowntown, towny:insideownplot,
towny:townrank, towny:nationrank, towny:town, towny:nation
  - Protect against cauldron filling/emptying, courtesy of Warriorrrr
with PR #5901.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants