Skip to content

Add new Module util methods#4730

Merged
Wide-Cat merged 8 commits into
MeteorDevelopment:masterfrom
crosby-moe:module-util-methods
Nov 27, 2025
Merged

Add new Module util methods#4730
Wide-Cat merged 8 commits into
MeteorDevelopment:masterfrom
crosby-moe:module-util-methods

Conversation

@crosby-moe

@crosby-moe crosby-moe commented Jul 7, 2024

Copy link
Copy Markdown
Collaborator

Type of change

  • Bug fix
  • New feature

Description

  • Add Module#enable as a shorthand for if (!module.isActive()) module.toggle();
  • Add Module#disable as a shorthand for if (module.isActive()) module.toggle();
  • Add Modules#getOptional for those who prefer a more functional programming style with Optionals
  • Rework SettingGroup#add generics:
    Previously, ColorSetting setting = sgGeneral.add(new ColorSetting(...)); was not possible without casting, as SettingGroup#add returned a typed Setting instance. It now returns the exact type that it received as input.

How Has This Been Tested?

works grate 👍

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@Wide-Cat Wide-Cat merged commit b334135 into MeteorDevelopment:master Nov 27, 2025
1 check passed
MistressOfDNS pushed a commit to MistressOfDNS/meteor-client-fork that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants