This commit is contained in:
NewGarbo 2015-11-25 17:40:12 +00:00
parent 9a8fba543d
commit c5211e0368
4 changed files with 36 additions and 4 deletions

View File

@ -12,6 +12,7 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.game.clans.tutorials.types.ClanTips.TipType;
public class ClanEnergyTracker extends MiniPlugin
{
@ -63,7 +64,7 @@ public class ClanEnergyTracker extends MiniPlugin
if (energyBounds != null && energyRemaining > energyBounds.getLeft() && energyRemaining < energyBounds.getMiddle())
{
_clans.middleTextClan(clan, energyBounds.getRight()[0], energyBounds.getRight()[1], 20, 200, 80);
_clans.messageClan(clan, F.main("Energy", "To top up your Clan's Energy, head to the shop and go to the Energy Shop!"));
_clans.sendTipToClan(clan, TipType.ENERGY);
}
}
}

View File

@ -92,6 +92,7 @@ import mineplex.game.clans.spawn.Spawn;
import mineplex.game.clans.spawn.travel.TravelShop;
import mineplex.game.clans.tutorials.TutorialManager;
import mineplex.game.clans.tutorials.types.ClanTips;
import mineplex.game.clans.tutorials.types.ClanTips.TipType;
import mineplex.minecraft.game.classcombat.Class.ClassManager;
import mineplex.minecraft.game.classcombat.Class.ClientClass;
import mineplex.minecraft.game.classcombat.Class.IPvpClass;
@ -618,7 +619,17 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
public void messageClan(ClanInfo clan, String message)
{
for (Player player : clan.getOnlinePlayers())
{
UtilPlayer.message(player, message);
}
}
public void sendTipToClan(ClanInfo clan, TipType tip)
{
for (Player player : clan.getOnlinePlayers())
{
ClanTips.displayTip(tip, player);
}
}
public void middleTextClan(ClanInfo clan, String header, String footer)

View File

@ -304,6 +304,7 @@ public class ClanMainPage extends ClanPageBase
private void addPlayerButton(int slot, ClansPlayer clansPlayer, ClanInfo guiInfo, ClanRole guiRole)
{
ClanRole playerRole = clansPlayer.getRole();
String itemName = (clansPlayer.isOnline() ? C.cGreenB : C.cRedB) + clansPlayer.getPlayerName();
ArrayList<String> lore = new ArrayList<String>(5);
lore.add(" ");
@ -323,9 +324,21 @@ public class ClanMainPage extends ClanPageBase
if (guiRole.has(ClanRole.ADMIN))
{
lore.add(" ");
lore.add(ChatColor.RESET + C.cYellow + "Left Click " + C.cWhite + "Promote");
lore.add(ChatColor.RESET + C.cYellow + "Right Click " + C.cWhite + "Demote");
lore.add(ChatColor.RESET + C.cYellow + "Shift-Right Click " + C.cWhite + "Kick");
if (!playerRole.has(ClanRole.LEADER) && guiRole.has(playerRole))
{
lore.add(ChatColor.RESET + C.cYellow + "Left Click " + C.cWhite + "Promote");
}
if (!playerRole.has(ClanRole.LEADER) && guiRole.has(playerRole))
{
lore.add(ChatColor.RESET + C.cYellow + "Right Click " + C.cWhite + "Demote");
}
if (!playerRole.has(ClanRole.LEADER))
{
lore.add(ChatColor.RESET + C.cYellow + "Shift-Right Click " + C.cWhite + "Kick");
}
}
ItemStack item = UtilSkull.getPlayerHead(clansPlayer.isOnline() ? clansPlayer.getPlayerName() : "", itemName, lore);

View File

@ -197,6 +197,13 @@ public class ClanTips extends MiniPlugin
C.cAqua + "War points indicate how many kills you have against a Clan! If it reaches +30 then an invasion starts!",
C.cAqua + "During an invasion the clan with +30 has full block access for 15 minutes!",
}),
ENERGY(
new String[] {
C.cDAquaB + "Energy",
C.cAqua + "To top up your energy, go to the Shop and buy some in the Energy Shop.",
C.cAqua + "To find the Shop, look at your map (use " + F.elem("/map") + " if you don't have one) and go to either the top-most highlighted area, or the bottom-most highlighted area.",
}),
;