formatting

This commit is contained in:
Chiss 2013-12-24 19:26:30 +11:00
parent d25487d545
commit f510083e7e
2 changed files with 33 additions and 4 deletions

View File

@ -1,16 +1,19 @@
package mineplex.hub.gadget.gadgets;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.disguise.disguises.DisguiseBlaze;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.hub.gadget.GadgetManager;
@ -20,13 +23,13 @@ public class BlazeHelmet extends ArmorGadget
{
public BlazeHelmet(GadgetManager manager)
{
super(manager, "Blaze", new String[]
super(manager, "Blaze Helmet", new String[]
{
C.cWhite + "Transforms the wearer into a fiery Blaze!",
" ",
C.cYellow + "Crouch" + C.cGray + " to use " + C.cGreen + "Firefly",
" ",
C.cDPurple + "Unlocked with Hero Rank",
C.cPurple + "Unlocked with Hero Rank",
},
-1,
ArmorSlot.Helmet, Material.FIRE, (byte)0);
@ -69,4 +72,15 @@ public class BlazeHelmet extends ArmorGadget
}
}
}
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
event.getPlayer().getInventory().setItem(5, ItemStackFactory.Instance.CreateStack(Material.CHEST, (byte)0, 1, ChatColor.RESET + C.cGreen + "Gadget Menu"));
if (Manager.Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.HERO))
{
Manager.Manager.GetDonation().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}
}
}

View File

@ -2,16 +2,20 @@ package mineplex.hub.mount.types;
import java.util.HashSet;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.hub.mount.DragonData;
@ -29,7 +33,7 @@ public class Dragon extends DragonMount
C.cWhite + "this prized dragon is said to",
C.cWhite + "obey only true Heroes!",
" ",
C.cDPurple + "Unlocked with Hero Rank",
C.cPurple + "Unlocked with Hero Rank",
},
Material.DRAGON_EGG,
(byte)0,
@ -99,4 +103,15 @@ public class Dragon extends DragonMount
for (DragonData dragon : GetActive().values())
dragon.Dragon.setCustomName(news);
}
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
event.getPlayer().getInventory().setItem(5, ItemStackFactory.Instance.CreateStack(Material.CHEST, (byte)0, 1, ChatColor.RESET + C.cGreen + "Gadget Menu"));
if (Manager.Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.HERO))
{
Manager.Manager.GetDonation().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}
}
}