Don't combine require() and a method accessor
This commit is contained in:
parent
78b6846cf6
commit
d64f50b98e
@ -4,14 +4,13 @@ import net.md_5.bungee.api.ChatColor;
|
|||||||
|
|
||||||
import mineplex.core.Managers;
|
import mineplex.core.Managers;
|
||||||
import mineplex.core.bonuses.BonusManager;
|
import mineplex.core.bonuses.BonusManager;
|
||||||
import mineplex.core.powerplayclub.PowerPlayClubRepository;
|
|
||||||
import mineplex.core.titles.tracks.Track;
|
import mineplex.core.titles.tracks.Track;
|
||||||
import mineplex.core.titles.tracks.TrackFormat;
|
import mineplex.core.titles.tracks.TrackFormat;
|
||||||
import mineplex.core.titles.tracks.TrackTier;
|
import mineplex.core.titles.tracks.TrackTier;
|
||||||
|
|
||||||
public class PowerPlayTrack extends Track
|
public class PowerPlayTrack extends Track
|
||||||
{
|
{
|
||||||
private final PowerPlayClubRepository _powerPlayClubRepository = Managers.require(BonusManager.class).getPowerPlayClubRepository();
|
private final BonusManager _bonusManager = Managers.require(BonusManager.class);
|
||||||
|
|
||||||
public PowerPlayTrack()
|
public PowerPlayTrack()
|
||||||
{
|
{
|
||||||
@ -20,7 +19,7 @@ public class PowerPlayTrack extends Track
|
|||||||
.addTier(new TrackTier(
|
.addTier(new TrackTier(
|
||||||
"Power Play Club",
|
"Power Play Club",
|
||||||
null,
|
null,
|
||||||
player -> _powerPlayClubRepository.getCachedData(player).isSubscribed() ? 1L : 0L,
|
player -> _bonusManager.getPowerPlayClubRepository().getCachedData(player).isSubscribed() ? 1L : 0L,
|
||||||
1,
|
1,
|
||||||
new TrackFormat(ChatColor.AQUA, ChatColor.AQUA)
|
new TrackFormat(ChatColor.AQUA, ChatColor.AQUA)
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user