Merge remote-tracking branch 'origin/clans-beta' into clans-beta

This commit is contained in:
Shaun Bennett 2015-11-26 22:38:03 -05:00
commit ef511f1704
22 changed files with 183 additions and 67 deletions

View File

@ -206,9 +206,15 @@ public class Recharge extends MiniPlugin
}
@EventHandler
public void clearPlayer(ClientUnloadEvent event)
public void clearPlayer(final ClientUnloadEvent event)
{
_recharge.remove(event.GetName());
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(_plugin, new Runnable() {
public void run()
{
_recharge.remove(event.GetName());
}
}
, 20 * 60 * 2); // Retain info for 2 minutes
}
public void setDisplayForce(Player player, String ability, boolean displayForce)

View File

@ -337,13 +337,20 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
for (Location location : jumpOffHolograms)
{
Hologram hologram = new Hologram(hologramManager, location, C.cGreen+ "JUMP OFF", C.cGreen + "to begin your Clans adventure!");
Hologram hologram = new Hologram(hologramManager, location,
C.cGreen + "Jump Off",
C.cGreen + "to begin your Clans adventure!");
hologram.start();
}
for (Location location : welcomeHolograms)
{
Hologram hologram = new Hologram(hologramManager, location, C.cGold + "Welcome to Clans Alpha", C.cAqua + "Please be aware there may be bugs", C.cAqua + "Map may reset at any time during Alpha!", C.cAqua + "Type " + C.cYellow + "/clan" + C.cAqua + " to get started!");
Hologram hologram = new Hologram(hologramManager, location,
C.cGreenB + "Welcome to Clans Alpha",
C.cWhite + "Please be aware there may be bugs",
C.cWhite + "Map may reset at any time during Alpha!",
C.cWhite + "Type " + C.cYellow + "/clan" + C.cWhite + " to get started!"
);
hologram.start();
}
@ -603,14 +610,14 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
ClanInfo clan = _clanUtility.getClanByPlayer(event.getPlayer());
String rank = _clientManager.Get(event.getPlayer()).GetRank().getTag(true, false);
String rank = _clientManager.Get(event.getPlayer()).GetRank().getTag(true, true) + " ";
if (!_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MEDIA))
rank = "";
if (client.isClanChat() && clan != null)
{
event.setFormat(rank + " " + C.cAqua + "%1$s " + C.cDAqua + "%2$s");
event.setFormat(rank+ C.cAqua + "%1$s " + C.cDAqua + "%2$s");
event.getRecipients().clear();
for (ClansPlayer cur : clan.getMembers().values())
@ -624,7 +631,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
}
else if (client.isAllyChat() && clan != null)
{
event.setFormat(rank + " " + C.cDGreen + clan.getName() + " " + C.cDGreen + "%1$s " + C.cGreen + "%2$s");
event.setFormat(rank+ C.cDGreen + clan.getName() + " " + C.cDGreen + "%1$s " + C.cGreen + "%2$s");
event.getRecipients().clear();
for (ClansPlayer cur : clan.getMembers().values())
@ -655,12 +662,12 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
if (clan == null)
{
event.setFormat(rank + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
event.setFormat(rank + C.cYellow + "%1$s " + C.cWhite + "%2$s");
return;
}
event.getRecipients().clear();
event.setFormat(rank + " " + C.cGold + clan.getName() + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
event.setFormat(rank + C.cGold + clan.getName() + " " + C.cYellow + "%1$s " + C.cWhite + "%2$s");
for (Player other : UtilServer.getPlayers())
{
@ -675,7 +682,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
String message = event.getMessage();
message = _chat.getFilteredMessage(event.getPlayer(), message);
ClanRelation rel = _clanUtility.rel(clan, otherClan);
String formatted = rank + " " + rel.getColor(true) + clan.getName() + " " + rel.getColor(false) + event.getPlayer().getName() + " " + C.cWhite + message;
String formatted = rank + rel.getColor(true) + clan.getName() + " " + rel.getColor(false) + event.getPlayer().getName() + " " + C.cWhite + message;
other.sendMessage(formatted);
}
}
@ -947,7 +954,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
// event.setKickMessage("This server is whitelisted!");
event.setKickMessage("PClans is currently in staff only Pre-Alpha!");
event.setKickMessage("Clans is currently in staff only Pre-Alpha!");
}
else if (UtilServer.getPlayers().length >= UtilServer.getServer().getMaxPlayers() && !rank.has(Rank.ADMIN) && !event.getPlayer().isWhitelisted())
{

View File

@ -729,12 +729,11 @@ public class ClansUtility
}
}
// if (clan.getClaims() >= clan.getClaimsMax())
// {
// UtilPlayer.message(caller, F.main("Clans", "Your Clan cannot claim
// more Territory."));
// return false;
// }
if (clan.getClaims() >= clan.getClaimsMax())
{
UtilPlayer.message(caller, F.main("Clans", "Your Clan cannot claim more Territory."));
return false;
}
// Adjacent
boolean selfAdj = false;

View File

@ -824,8 +824,8 @@ public class ClansCommand extends CommandBase<ClansManager>
Plugin.ClanTips.displayTip(TipType.SETHOME, caller);
// Inform
UtilPlayer.message(caller, F.main("Clans", "You set Clan Home to " + UtilWorld.locToStrClean(caller.getLocation()) + "."));
clan.inform(caller.getName() + " set Clan Home to " + UtilWorld.locToStrClean(caller.getLocation()) + ".", caller.getName());
UtilPlayer.message(caller, F.main("Clans", "You set Clan Home to " + F.elem(UtilWorld.locToStrClean(caller.getLocation())) + "."));
clan.inform(caller.getName() + " set Clan Home to " + F.elem(UtilWorld.locToStrClean(caller.getLocation())) + ".", caller.getName());
}
public void infoClan(Player caller, String search)

View File

@ -61,7 +61,7 @@ public class ClanWhoPage extends ClanPageBase
lore.add(" ");
// Basic Clan Info
lore.add(C.Reset + C.cYellow + "Description " + C.cWhite + _lookupClan.getDesc());
// lore.add(C.Reset + C.cYellow + "Description " + C.cWhite + _lookupClan.getDesc());
lore.add(C.Reset + C.cYellow + "Formed " + C.cWhite + UtilTime.convertString(System.currentTimeMillis() - _lookupClan.getDateCreated().getTime(), 1, UtilTime.TimeUnit.FIT));
lore.add(C.Reset + C.cYellow + "Members " + C.cWhite + _lookupClan.getOnlinePlayerCount() + "/" + _lookupClan.getMembers().size());
lore.add(C.Reset + C.cYellow + "Territory " + C.cWhite + _lookupClan.getClaims() + "/" + _lookupClan.getClaimsMax());
@ -89,8 +89,8 @@ public class ClanWhoPage extends ClanPageBase
allyUnsorted.add(allyName);
for (String cur : UtilAlg.sortKey(allyUnsorted))
allySorted += getPlugin().getClanUtility().mRel(getPlugin().getClanUtility().relPC(getPlayer(), getPlugin().getClanMap().get(cur)), cur, false)
+ ", ";
allySorted += C.cGreen + cur + C.cWhite + ", ";
lore.add(C.Reset + C.cYellow + "Allies");
lore.add(" " + allySorted);
}

View File

@ -49,9 +49,9 @@ public class PotatoManager extends MiniPlugin implements IThrown
private void give(Player player, int count)
{
ItemStack potato = new ItemStack(Material.BAKED_POTATO, count);
ItemMeta meta = potato.getItemMeta();
meta.setDisplayName(POTATO_NAME);
potato.setItemMeta(meta);
// ItemMeta meta = potato.getItemMeta();
// meta.setDisplayName(POTATO_NAME);
// potato.setItemMeta(meta);
player.getInventory().addItem(potato);
}

View File

@ -62,7 +62,7 @@ public class ClansScoreboardManager extends ScoreboardManager
@EventHandler
public void drawUpdate(UpdateEvent event)
{
if (event.getType() == UpdateType.FAST) draw();
if (event.getType() == UpdateType.FASTER) draw();
}
@Override

View File

@ -8,6 +8,7 @@ import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import mineplex.game.clans.clans.ClansManager;
import mineplex.game.clans.clans.stuck.StuckManager;
public class StuckCommand extends CommandBase<StuckManager>
@ -32,6 +33,11 @@ public class StuckCommand extends CommandBase<StuckManager>
return;
}
if(ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()) != null && !ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()).Owner.equals("Borderlands"))
{
return;
}
UtilPlayer.message(caller, F.main("Clans", "Teleporting to Spawn... Please do not move for " + F.elem(UtilTime.MakeStr(StuckManager.UNSTICK_WAIT_TIME))) + ".");
Plugin.unstick(caller);

View File

@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.scoreboard.ScoreboardManager;
import mineplex.game.clans.clans.ClanInfo;
import mineplex.game.clans.clans.ClansManager;
@ -89,6 +90,13 @@ public class KingHill extends WorldEvent
{
tickHill();
if (getState() == EventState.PREPARE)
{
System.out.println("Constructed " + getName() + " at " + UtilWorld.locToStrClean(getCenterLocation()) + ".");
announceStart();
setState(EventState.LIVE);
}
if (System.currentTimeMillis() > _nextLootDrop)
{
// Drop Loot!
@ -149,7 +157,7 @@ public class KingHill extends WorldEvent
if (System.currentTimeMillis() - _lastOnHillMessage > 60000)
{
Bukkit.broadcastMessage(F.desc("Hill", F.elem(lastClan.getName()) + " own the hill (" + F.time(UtilTime.MakeStr(capData.TicksOnHill * 50)) + ")"));
Bukkit.broadcastMessage(F.main("Hill", F.elem(lastClan.getName()) + " own the hill (" + F.time(UtilTime.MakeStr(capData.TicksOnHill * 50)) + ")"));
_lastOnHillMessage = System.currentTimeMillis();
}
}

View File

@ -48,7 +48,7 @@ public class CustomItem
}
protected String _displayName;
private String _description;
private String[] _description;
private Material _material;
private String _uuid;
@ -60,7 +60,7 @@ public class CustomItem
return _uuid;
}
public CustomItem(String displayName, String description, Material material)
public CustomItem(String displayName, String[] description, Material material)
{
_displayName = displayName;
_description = description;
@ -82,7 +82,7 @@ public class CustomItem
return ChatColor.RESET.toString() + TITLE_COLOR + _attributes.formatItemName(_displayName);
}
public String getDescription()
public String[] getDescription()
{
return _description;
}
@ -93,7 +93,9 @@ public class CustomItem
if (getDescription() != null)
{
lore.add(ATTRIBUTE_COLOR + getDescription());
for (String desc : getDescription()){
lore.add(ATTRIBUTE_COLOR + desc);
}
}
// Display attribute descriptions and stats in lore

View File

@ -26,8 +26,10 @@ public class GoldToken extends CustomItem
}
@Override
public String getDescription()
public String[] getDescription()
{
return String.format("A gold token worth %s gold coins.", _goldValue);
return new String[] {
String.format("A gold token worth %s gold coins.", _goldValue),
};
}
}

View File

@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
import mineplex.game.clans.items.generation.ValueDistribution;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -27,7 +28,15 @@ public class AlligatorsTooth extends LegendaryItem
public AlligatorsTooth()
{
super("Alligators Tooth", "Grants bonus damage in water and special ability to swim fast!", Material.RECORD_4);
super("Alligators Tooth", new String[] {
C.cWhite + "This deadly tooth was stolen from",
C.cWhite + "a nest of reptillian beasts long",
C.cWhite + "ago. Legends say that the holder",
C.cWhite + "is granted the underwater agility",
C.cWhite + "of an Alligator",
" ",
C.cYellow + "Right-Click" + C.cWhite + " to use" + C.cGreen + " Swim",
}, Material.RECORD_4);
_swimSpeed = boostGen.generateValue();
}

View File

@ -5,6 +5,7 @@ import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
@ -19,7 +20,15 @@ public class GiantsBroadsword extends LegendaryItem
public GiantsBroadsword()
{
super("Giants Broadsword", "Deal huge damage and block to gain defensive abilities!", Material.GOLD_RECORD);
super("Giants Broadsword", new String[]{
C.cWhite + "Forged in the godly mines of Plagieus",
C.cWhite + "this sword has endured thousands of",
C.cWhite + "wars. It is sure to grant certain",
C.cWhite + "victory in battle.",
C.cWhite + " ",
C.cWhite + "Deals " + C.cYellow + "10 Damage" + C.cWhite + " with attack",
C.cYellow + "Right-Click" + C.cWhite + " to use " + C.cGreen + "Shield",
}, Material.GOLD_RECORD);
}
@Override
@ -53,7 +62,7 @@ public class GiantsBroadsword extends LegendaryItem
private void buffPlayer(Player player)
{
grantPotionEffect(player, PotionEffectType.SLOW, 10, 10);
grantPotionEffect(player, PotionEffectType.SLOW, 20, 10);
grantPotionEffect(player, PotionEffectType.REGENERATION, 1, 10);
}
}

View File

@ -5,6 +5,8 @@ import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import mineplex.core.common.util.C;
import mineplex.core.recharge.Recharge;
import mineplex.game.clans.items.generation.ValueDistribution;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -22,7 +24,17 @@ public class HyperAxe extends LegendaryItem
public HyperAxe()
{
super("Hyper Axe", "Increased attack speed!", Material.RECORD_3);
super("Hyper Axe", new String[]{
C.cWhite + "Of all the weapons known to man,",
C.cWhite + "none is more prevalent than the",
C.cWhite + "Hyper Axe. Infused with rabbit's",
C.cWhite + "speed and pigman's ferocity, this",
C.cWhite + "blade can rip through any opponent.",
C.cWhite + " ",
C.cWhite + "Hit delay is reduced by " + C.cYellow + "50%",
C.cWhite + "Deals " + C.cYellow + "10 Damage" + C.cWhite + " with attack",
C.cYellow + "Right-Click" + C.cWhite + " to use " + C.cGreen + "Dash",
}, Material.RECORD_3);
_speedAmount = amountGen.generateIntValue();
_speedDuration = durationGen.generateIntValue();
_lastAttack = 0;
@ -56,6 +68,9 @@ public class HyperAxe extends LegendaryItem
private void buffPlayer(Player wielder)
{
if (!Recharge.Instance.use(wielder, "Hyper Rush", 16000, true, true))
return;
// Give player speed buff
wielder.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, _speedDuration, _speedAmount));
log("Buffing");

View File

@ -18,7 +18,7 @@ public class LegendaryItem extends CustomItem
private long _lastBlock; // Timestamp of last block from wielder
public long timeSinceLastBlock() { return System.currentTimeMillis() - _lastBlock; }
public LegendaryItem(String name, String description, Material material)
public LegendaryItem(String name, String[] description, Material material)
{
super(name, description, material);

View File

@ -8,6 +8,9 @@ import org.bukkit.util.Vector;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.common.util.UtilWorld;
import mineplex.game.clans.clans.ClansManager;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -16,9 +19,13 @@ public class MagneticMaul extends LegendaryItem
{
public static final double PULL_RANGE = 10d;
private double _power;
public MagneticMaul()
{
super("Magnetic Maul", "Pull enemies closer with special abilities!", Material.RECORD_5);
super("Magnetic Maul", new String[]{
}, Material.RECORD_5);
}
@Override
@ -27,7 +34,7 @@ public class MagneticMaul extends LegendaryItem
Location loc = wielder.getLocation();
if (ClansManager.getInstance().getClaimMap().containsKey(UtilWorld.chunkToStr(loc.getChunk())))
{
if (!ClansManager.getInstance().getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).isSafe(wielder.getLocation()))
if (ClansManager.getInstance().getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).isSafe(wielder.getLocation()))
{
return;
}
@ -37,16 +44,21 @@ public class MagneticMaul extends LegendaryItem
{
pullEntities(wielder);
}
else
{
addPower(0.65);
}
UtilTextBottom.displayProgress(UtilMath.clamp(_power, .0, 80.) / 60., wielder);
}
@Override
public void onAttack(CustomDamageEvent event, Player wielder)
{
event.AddKnockback("Magnetic Blade", -0.5d); // Pull players with negative knockback
event.AddKnockback("Magnetic Blade", -0.5d); // Pull players with negative knockback
event.AddMod("Magnetic Maul", 7);
log("Negative knockback!");
// TODO: Apply negative knockback with [???] velocity/power to victims of attacks
}
private void pullEntities(Player player)
@ -58,7 +70,10 @@ public class MagneticMaul extends LegendaryItem
for (LivingEntity entity : player.getWorld().getLivingEntities())
{
if (entity.getEntityId() == player.getEntityId()) continue; // Skip player pulling
if (entity.getEntityId() == player.getEntityId())
{
continue; // Skip pulling self
}
double otherDistance = player.getLocation().distance(entity.getLocation());
double otherTargetDistance = target.distance(entity.getLocation());
@ -66,13 +81,34 @@ public class MagneticMaul extends LegendaryItem
// If player is in-front of us and within pulling range
if (otherTargetDistance < targetDistance && otherDistance <= PULL_RANGE)
{
// If entity is in safe zone, don't allow pulling of that entity.
if (ClansManager.getInstance().getClaimMap().containsKey(UtilWorld.chunkToStr(entity.getLocation().getChunk())))
{
if (ClansManager.getInstance().getClaimMap().get(UtilWorld.chunkToStr(entity.getLocation().getChunk())).isSafe(entity.getLocation()))
{
continue;
}
}
UtilAction.velocity(entity, UtilAlg.getTrajectory(entity, player), 0.3, false, 0, 0, 1, true);
}
}
removePower(.88);
}
private void addPower(double power)
{
_power = UtilMath.clamp(_power + power, 0, 80);
}
private void removePower(double power)
{
_power = UtilMath.clamp(_power - power, 0, 80);
}
private boolean canPull()
{
return true; // TODO: Implement cooldown? (Sounds OP without one)
return _power >= 20;
}
}

View File

@ -11,7 +11,9 @@ public class MeteorBow extends LegendaryItem
public MeteorBow()
{
super("Meteor Bow", "Shoot explosive arrows!", Material.BOW);
super("Meteor Bow", new String[]{
"Shoot explosive arrows!"
}, Material.BOW);
_flightTime = 0;
}

View File

@ -8,6 +8,7 @@ import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilItem;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
@ -30,7 +31,15 @@ public class WindBlade extends LegendaryItem
public WindBlade()
{
super("Wind Blade", "Activate flying ability to take flight!", Material.GREEN_RECORD);
super("Wind Blade", new String[] {
C.cWhite + "Long ago, a race of cloud dwellers",
C.cWhite + "terrorized the skies. A remnant of",
C.cWhite + "their tyranny, this airy blade is",
C.cWhite + "the last surviving memorium from",
C.cWhite + "their final battle against the Titans.",
" ",
C.cYellow + "Right-Click" + C.cWhite + " to use" + C.cGreen + " Fly",
}, Material.GREEN_RECORD);
}
@Override
@ -46,7 +55,7 @@ public class WindBlade extends LegendaryItem
// Check if player is attempting to fly and activate
if (isHoldingRightClick())
{
if (canPropel())
if (canPropel(wielder))
{
if (burnoutRemaining > 0)
{
@ -123,12 +132,12 @@ public class WindBlade extends LegendaryItem
direction.multiply(FLIGHT_VELOCITY);
player.setVelocity(direction);
player.setFallDistance(0f);
player.setFallDistance(-60f);
}
private boolean canPropel()
private boolean canPropel(Player player)
{
return _power > 0;
return _power > 0 && !UtilItem.isLiquid(player.getLocation().getBlock().getType());
}
private void addPower(double power)

View File

@ -48,7 +48,7 @@ public class ShopItemButton<T extends ShopPageBase<?, ?>> implements IButton
if (!hasItem(player, _item))
{
_page.playDenySound(player);
notify(player, "You do not have any of the appropriate item in your inventory!");
notify(player, "You do not have any of the appropriate item in your inventory.");
return;
}
@ -63,7 +63,7 @@ public class ShopItemButton<T extends ShopPageBase<?, ?>> implements IButton
int reward = amount * _sellPrice;
GoldManager.getInstance().addGold(player, reward);
GoldManager.notify(player, String.format("You sold %d items for %dg!", amount, reward));
GoldManager.notify(player, String.format("You sold %d items for %dg", amount, reward));
_page.playAcceptSound(player);
}
else if (clickType == ClickType.SHIFT_LEFT || clickType == ClickType.LEFT)
@ -97,13 +97,13 @@ public class ShopItemButton<T extends ShopPageBase<?, ?>> implements IButton
final int finalAmount = event.getAmount();
giftItem(player, finalAmount);
GoldManager.notify(player, String.format("You have purchased %d item(s) for %dg!", finalAmount, finalCost));
GoldManager.notify(player, String.format("You have purchased %d item(s) for %dg", finalAmount, finalCost));
_page.playAcceptSound(player);
}
else
{
GoldManager.notify(player, "You cannot afford that item! Please relog to update your gold count!");
GoldManager.notify(player, "You cannot afford that item! Please relog to update your gold count.");
_page.playDenySound(player);
}
}
@ -111,7 +111,7 @@ public class ShopItemButton<T extends ShopPageBase<?, ?>> implements IButton
}
else
{
GoldManager.notify(player, "You cannot afford that item!");
GoldManager.notify(player, "You cannot afford that item.");
_page.playDenySound(player);
}
}

View File

@ -70,7 +70,7 @@ public class BankPage extends ShopPageBase<ClansManager, BankShop>
{
int playerGold = getPlayerGold();
int playerGems = getPlayerGems();
double conversionCount = GEM_CONVERSION * GoldManager.GEM_CONVERSION_RATE;
int conversionCount = (int) (GEM_CONVERSION * GoldManager.GEM_CONVERSION_RATE);
GemTransferButton button = new GemTransferButton(this, GEM_CONVERSION);
String title = ChatColor.GOLD + C.Bold + "Convert Gems To Gold!";
@ -100,7 +100,7 @@ public class BankPage extends ShopPageBase<ClansManager, BankShop>
String playerGoldString = ChatColor.RESET + F.value("Your Gold", playerGold + "g");
String purchaseString = ChatColor.RESET + F.value("Token Value", TOKEN_VALUE + "g");
String goldString = ChatColor.RESET + C.cWhite + "Store your bank gold in the form of a gold token!";
ShopItem shopItem = new ShopItem(Material.GOLD_RECORD, title, new String[] {" ", playerGoldString, purchaseString, goldString}, 0, true, true);
ShopItem shopItem = new ShopItem(Material.RECORD_12, title, new String[] {" ", playerGoldString, purchaseString, goldString}, 0, true, true);
addButton(3, shopItem, button);
}
@ -114,7 +114,7 @@ public class BankPage extends ShopPageBase<ClansManager, BankShop>
String playerGoldString = ChatColor.RESET + F.value("Your Gold", playerGold + "g");
String purchaseString = ChatColor.RESET + C.cWhite + "You don't have enough gold";
String goldString = ChatColor.RESET + C.cWhite + "You need " + C.cYellow + goldCost + C.cWhite + " gold to purchase a token.";
ShopItem shopItem = new ShopItem(Material.GOLD_RECORD, title, new String[] {" ", playerGoldString, purchaseString, goldString}, 0, true, true);
ShopItem shopItem = new ShopItem(Material.RECORD_12, title, new String[] {" ", playerGoldString, purchaseString, goldString}, 0, true, true);
addButton(3, shopItem, button);
}

View File

@ -35,8 +35,9 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
@Override
protected void buildPage()
{
addTravelLocation(Spawn.getEastSpawn(), getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? Material.SKULL_ITEM : Material.IRON_SWORD, getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRed : C.cWhite + "East Spawn", new String[] {
getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRed + "You are already here.": "",
addTravelLocation(Spawn.getEastSpawn(), getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? Material.SKULL_ITEM : Material.IRON_SWORD, (getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRedB : C.cGreenB) + "East Spawn", new String[] {
getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? C.cRed + "You are already here." : "",
getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? " " : "",
C.cWhite + "Spawns are locations where",
C.cWhite + "you respawn after dying.",
" ",
@ -44,16 +45,17 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
C.cWhite + "as they are Safe Zones.",
}, 14 + 10, getPlayer().getLocation().distance(Spawn.getEastSpawn()) <= 64 ? (byte) 3 : (byte) 0);
addTravelLocation(Spawn.getWestSpawn(), getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? Material.SKULL_ITEM : Material.IRON_SWORD, getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? C.cRed : C.cWhite + "West Spawn", new String[] {
addTravelLocation(Spawn.getWestSpawn(), getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? Material.SKULL_ITEM : Material.IRON_SWORD, (getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? C.cRedB : C.cGreenB) + "West Spawn", new String[] {
getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? C.cRed + "You are already here.": "",
C.cWhite + "Spawns are locations where",
getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? " " : "",
C.cWhite + "Spawns are locations where",
C.cWhite + "you respawn after dying.",
" ",
C.cWhite + "You cannot be attacked here,",
C.cWhite + "as they are Safe Zones.",
}, 12 + 8, getPlayer().getLocation().distance(Spawn.getWestSpawn()) <= 64 ? (byte) 3 : (byte) 0);
addTravelLocation(Spawn.getNorthTown(), Material.EMERALD, "North Shop", new String[] {
addTravelLocation(Spawn.getNorthTown(), Material.RECORD_12, C.cDGreenB + "North Shop", new String[] {
C.cWhite + "Shops are locations where you",
C.cWhite + "can buy and sell all sorts of goods.",
" ",
@ -61,7 +63,7 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
C.cWhite + "as they are Safe Zones.",
}, 4);
addTravelLocation(Spawn.getSouthTown(), Material.EMERALD, "South Shop", new String[] {
addTravelLocation(Spawn.getSouthTown(), Material.RECORD_12, C.cDGreenB + "South Shop", new String[] {
C.cWhite + "Shops are locations where you",
C.cWhite + "can buy and sell all sorts of goods.",
" ",
@ -101,7 +103,8 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
else
{
meta.setDisplayName(C.cRed + "Clan Home");
meta.setLore(Arrays.asList(C.cGray + "Your Clan's Home Bed has been destroyed, or is obstructed."));
meta.setLore(Arrays.asList(C.cGray + "Your Clan's Home Bed has been",
C.cGray + "destroyed, or is obstructed."));
}
}
@ -119,7 +122,7 @@ public class TravelPage extends ShopPageBase<ClansManager, TravelShop>
}
});
addButton(53, new ItemBuilder(new ItemStack(Material.WATCH, 1)).setTitle(C.cGold + "Mineplex Lobby").addLore(" ", C.cYellow + "Left-Click" + C.cWhite + " to Warp", " ", C.cWhite + "This will teleport you out of Clans", C.cWhite + "back to the main Mineplex Lobby.", " ", C.cWhite + "You can do this at any time by", C.cWhite + "typing /lobby.").build(), new IButton()
addButton(44, new ItemBuilder(new ItemStack(Material.WATCH, 1)).setTitle(C.cGold + "Mineplex Lobby").addLore(" ", C.cYellow + "Left-Click" + C.cWhite + " to Warp", " ", C.cWhite + "This will teleport you out of Clans", C.cWhite + "back to the main Mineplex Lobby.", " ", C.cWhite + "You can do this at any time by", C.cWhite + "typing /lobby.").build(), new IButton()
{
public void onClick(Player player, ClickType clickType)
{

View File

@ -112,17 +112,20 @@ public class ClanTips extends MiniPlugin
return;
}
if (!_preferences.Get(player).ClanTips)
if (!_preferences.Get(player).ClanTips && !tip._ignorePreferences)
{
return;
}
UtilPlayer.message(player, " ");
UtilPlayer.message(player, tip._messages);
if (!tip._ignorePreferences)
{
UtilPlayer.message(player, C.cGray + "(You can disable these Clans Tips in the " + F.elem("/prefs") + " menu.)");
}
UtilPlayer.message(player, " ");
}
public static enum TipType