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
*/
public List<GameModeAddon> getGameModeAddons() {
return addons.stream()
.filter(addon -> addon.getState().equals(Addon.State.ENABLED))
return getEnabledAddons().stream()
.filter(GameModeAddon.class::isInstance)
.map(GameModeAddon.class::cast)
.collect(Collectors.toList());