Merge branch 'feature/staff-titles' into develop

This commit is contained in:
cnr 2017-07-05 21:39:14 -07:00
commit e1a5e1d111
6 changed files with 184 additions and 0 deletions

View File

@ -9,6 +9,11 @@ import java.util.function.Consumer;
import mineplex.core.titles.tracks.award.AlienInvasionTrack;
import mineplex.core.titles.tracks.award.AprilFools2017Track;
import mineplex.core.titles.tracks.award.ClansRaidTrack;
import mineplex.core.titles.tracks.staff.BuilderTrack;
import mineplex.core.titles.tracks.staff.ModeratorTrack;
import mineplex.core.titles.tracks.staff.SeniorModeratorTrack;
import mineplex.core.titles.tracks.staff.TraineeTrack;
import mineplex.core.titles.tracks.standard.GemHuntersTrack;
import net.md_5.bungee.api.ChatColor;
@ -86,6 +91,13 @@ public class TrackManager extends MiniPlugin
registerTrack(new Bridges2017Track());
registerTrack(new AprilFools2017Track());
registerTrack(new AlienInvasionTrack());
registerTrack(new ClansRaidTrack());
// Staff tracks
registerTrack(new BuilderTrack());
registerTrack(new TraineeTrack());
registerTrack(new ModeratorTrack());
registerTrack(new SeniorModeratorTrack());
// Custom tracks
// registerTrack(track("lenny", "Lenny", "( ͡° ͜ʖ ͡°)"));

View File

@ -0,0 +1,28 @@
package mineplex.core.titles.tracks.award;
import mineplex.core.titles.tracks.ItemizedTrack;
import mineplex.core.titles.tracks.TrackFormat;
import mineplex.core.titles.tracks.TrackTier;
import net.md_5.bungee.api.ChatColor;
public class ClansRaidTrack extends ItemizedTrack
{
public ClansRaidTrack()
{
super(
"clans-raid",
ChatColor.GOLD,
"Fallen Lord",
"The Fallen Lord",
"Among the first players to defeat the Charles Witherton raid!",
true);
getRequirements()
.addTier(new TrackTier(
"The Fallen Lord",
null,
this::owns,
new TrackFormat(ChatColor.GOLD, ChatColor.GOLD)
));
}
}

View File

@ -0,0 +1,36 @@
package mineplex.core.titles.tracks.staff;
import mineplex.core.Managers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.Rank;
import mineplex.core.titles.tracks.ItemizedTrack;
import mineplex.core.titles.tracks.Track;
import mineplex.core.titles.tracks.TrackFormat;
import mineplex.core.titles.tracks.TrackTier;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.entity.Player;
public class BuilderTrack extends ItemizedTrack
{
private final CoreClientManager _clientManager = Managers.get(CoreClientManager.class);
public BuilderTrack()
{
super("staff-builder", ChatColor.BLUE, "Builder", "What's a Happer?", "What's a leader?", true);
getRequirements()
.addTier(new TrackTier(
"What's a Happer?",
null,
this::owns,
new TrackFormat(ChatColor.BLUE, ChatColor.BLUE)
));
}
@Override
public boolean owns(Player player)
{
Rank rank = _clientManager.Get(player).GetRank(true);
return rank == Rank.MAPDEV || rank == Rank.MAPLEAD || rank == Rank.MAPPER || rank.has(Rank.ADMIN);
}
}

View File

@ -0,0 +1,36 @@
package mineplex.core.titles.tracks.staff;
import mineplex.core.Managers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.Rank;
import mineplex.core.titles.tracks.ItemizedTrack;
import mineplex.core.titles.tracks.Track;
import mineplex.core.titles.tracks.TrackFormat;
import mineplex.core.titles.tracks.TrackTier;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.entity.Player;
public class ModeratorTrack extends ItemizedTrack
{
private final CoreClientManager _clientManager = Managers.get(CoreClientManager.class);
public ModeratorTrack()
{
super("staff-moderator", ChatColor.GOLD, "Moderator", "My name isn't mod", "I have a name y'know!", true);
getRequirements()
.addTier(new TrackTier(
"My name isn't mod",
null,
this::owns,
new TrackFormat(ChatColor.GOLD, ChatColor.GOLD)
));
}
@Override
public boolean owns(Player player)
{
Rank rank = _clientManager.Get(player).GetRank(true);
return rank == Rank.MODERATOR || rank == Rank.CMA || rank.has(Rank.ADMIN);
}
}

View File

@ -0,0 +1,37 @@
package mineplex.core.titles.tracks.staff;
import mineplex.core.Managers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.titles.tracks.ItemizedTrack;
import mineplex.core.titles.tracks.Track;
import mineplex.core.titles.tracks.TrackFormat;
import mineplex.core.titles.tracks.TrackTier;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.entity.Player;
public class SeniorModeratorTrack extends ItemizedTrack
{
private final CoreClientManager _clientManager = Managers.get(CoreClientManager.class);
public SeniorModeratorTrack()
{
super("staff-srmod", ChatColor.GOLD, "Sr.Mod", "I my team is the best team", "Team loyalty at its finest", true);
getRequirements()
.addTier(new TrackTier(
"I think my team is the best team",
null,
this::owns,
new TrackFormat(ChatColor.GOLD, ChatColor.GOLD)
));
}
@Override
public boolean owns(Player player)
{
Rank rank = _clientManager.Get(player).GetRank(true);
return rank == Rank.SNR_MODERATOR || rank == Rank.CMOD || rank.has(Rank.ADMIN);
}
}

View File

@ -0,0 +1,35 @@
package mineplex.core.titles.tracks.staff;
import mineplex.core.Managers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.Rank;
import mineplex.core.titles.tracks.ItemizedTrack;
import mineplex.core.titles.tracks.TrackFormat;
import mineplex.core.titles.tracks.TrackTier;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.entity.Player;
public class TraineeTrack extends ItemizedTrack
{
private final CoreClientManager _clientManager = Managers.get(CoreClientManager.class);
public TraineeTrack()
{
super("staff-trainee", ChatColor.GOLD, "Trainee", "Choo Choo", "Choo Choo I'm a train-ee", true);
getRequirements()
.addTier(new TrackTier(
"Choo Choo",
null,
this::owns,
new TrackFormat(ChatColor.GOLD, ChatColor.GOLD)
));
}
@Override
public boolean owns(Player player)
{
Rank rank = _clientManager.Get(player).GetRank(true);
return rank == Rank.HELPER || rank.has(Rank.ADMIN);
}
}