Use #getEnabledAddons() in AddonsManager#getGameModeAddons()

This commit is contained in:
Florian CUNY 2019-01-16 18:53:11 +01:00 committed by GitHub
parent f381301b25
commit eeda960d42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,8 +244,7 @@ public class AddonsManager {
* @since 1.1 * @since 1.1
*/ */
public List<GameModeAddon> getGameModeAddons() { public List<GameModeAddon> getGameModeAddons() {
return addons.stream() return getEnabledAddons().stream()
.filter(addon -> addon.getState().equals(Addon.State.ENABLED))
.filter(GameModeAddon.class::isInstance) .filter(GameModeAddon.class::isInstance)
.map(GameModeAddon.class::cast) .map(GameModeAddon.class::cast)
.collect(Collectors.toList()); .collect(Collectors.toList());