From d64f50b98e37de8326836ecb9f0b40e67dae76d6 Mon Sep 17 00:00:00 2001 From: cnr Date: Thu, 16 Mar 2017 01:13:54 -0500 Subject: [PATCH] Don't combine require() and a method accessor --- .../mineplex/core/titles/tracks/standard/PowerPlayTrack.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/standard/PowerPlayTrack.java b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/standard/PowerPlayTrack.java index 1badc6ce1..81fe01721 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/standard/PowerPlayTrack.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/standard/PowerPlayTrack.java @@ -4,14 +4,13 @@ import net.md_5.bungee.api.ChatColor; import mineplex.core.Managers; import mineplex.core.bonuses.BonusManager; -import mineplex.core.powerplayclub.PowerPlayClubRepository; import mineplex.core.titles.tracks.Track; import mineplex.core.titles.tracks.TrackFormat; import mineplex.core.titles.tracks.TrackTier; public class PowerPlayTrack extends Track { - private final PowerPlayClubRepository _powerPlayClubRepository = Managers.require(BonusManager.class).getPowerPlayClubRepository(); + private final BonusManager _bonusManager = Managers.require(BonusManager.class); public PowerPlayTrack() { @@ -20,7 +19,7 @@ public class PowerPlayTrack extends Track .addTier(new TrackTier( "Power Play Club", null, - player -> _powerPlayClubRepository.getCachedData(player).isSubscribed() ? 1L : 0L, + player -> _bonusManager.getPowerPlayClubRepository().getCachedData(player).isSubscribed() ? 1L : 0L, 1, new TrackFormat(ChatColor.AQUA, ChatColor.AQUA) ));