Added icons and lores

Added floor for the chest
Fixed little copy paste error in BuyChestButton
Reduced amount of gold in the costume
This commit is contained in:
LCastr0 2017-03-03 21:50:16 -03:00
parent 28746c7873
commit 2b18d62f0f
6 changed files with 34 additions and 39 deletions

View File

@ -8,7 +8,6 @@ import org.bukkit.Material;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@ -31,7 +30,7 @@ public class OutfitStPatricksSuit extends OutfitGadget
public OutfitStPatricksSuit(GadgetManager manager, String name, int cost, OutfitGadget.ArmorSlot slot, Material mat, byte data)
{
super(manager, name, UtilText.splitLinesToArray(new String[]{C.cGray + "Placeholder"}, LineFormat.LORE), cost, slot, mat, data);
super(manager, name, UtilText.splitLinesToArray(new String[]{C.cGray + "Wherever a Leprechaun goes he leaves behind a trail of gold and a hint of spring."}, LineFormat.LORE), cost, slot, mat, data);
setColor(Color.fromRGB(0, 153, 0));
ItemStack displayItem = new ItemStack(mat, 1, data);
if (displayItem.getItemMeta() instanceof LeatherArmorMeta)
@ -55,26 +54,6 @@ public class OutfitStPatricksSuit extends OutfitGadget
removeArmor(player, message);
}
@EventHandler
public void onPlayerMove(PlayerMoveEvent event)
{
// Prevents event running 4 times
if (getSlot() != ArmorSlot.HELMET)
return;
if (!setActive(event.getPlayer()))
return;
// Drops gold
ItemStack itemStack = new ItemStack(Material.GOLD_INGOT);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName("DROPPED" + System.currentTimeMillis() + UtilMath.random.nextInt());
itemStack.setItemMeta(itemMeta);
Item gold = event.getPlayer().getWorld().dropItem(event.getPlayer().getLocation().add(0.5, 1.5, 0.5), itemStack);
_items.add(gold);
gold.setVelocity(new Vector((Math.random()-0.5)*0.3, Math.random()-0.4, (Math.random()-0.5)*0.3));
}
@EventHandler
public void onUpdate(UpdateEvent event)
{
@ -84,6 +63,20 @@ public class OutfitStPatricksSuit extends OutfitGadget
if (event.getType() == UpdateType.TICK)
cleanItems();
if (event.getType() == UpdateType.FASTER)
{
for (Player player : getActive())
{
ItemStack itemStack = new ItemStack(Material.GOLD_INGOT);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName(player.getName() + "DROPPED" + System.currentTimeMillis() + UtilMath.random.nextInt());
itemStack.setItemMeta(itemMeta);
Item gold = player.getWorld().dropItem(player.getLocation().add(0.5, 1.5, 0.5), itemStack);
_items.add(gold);
gold.setVelocity(new Vector((Math.random() - 0.5) * 0.3, Math.random() - 0.4, (Math.random() - 0.5) * 0.3));
}
}
}
@EventHandler

View File

@ -19,10 +19,11 @@ public class RainbowTaunt extends TauntGadget
public RainbowTaunt(GadgetManager manager)
{
super(manager, "Rainbow Taunt", UtilText.splitLinesToArray(new String[]{C.cGray + "Placeholder"},
LineFormat.LORE), -18, Material.GLASS, (byte) 0);
super(manager, "Rainbow Taunt", UtilText.splitLinesToArray(new String[]{C.cGray + "At the end of every Rainbow they say there is a pot of Gold.", C.cWhite + "Type /taunt in game to use this taunt."},
LineFormat.LORE), -18, Material.WOOL, (byte) 11);
setCanPlayWithPvp(false);
setPvpCooldown(PVP_COOLDOWN);
setShouldPlay(false);
}
@Override

View File

@ -7,7 +7,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Item;
@ -17,6 +16,7 @@ import org.bukkit.event.entity.HorseJumpEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.mount.HorseMount;
@ -36,9 +36,8 @@ public class MountStPatricksHorse extends HorseMount
public MountStPatricksHorse(MountManager manager)
{
super(manager, "St Patrick's Mount",
UtilText.splitLineToArray(UtilText.colorWords("The British might be coming, but with this impressive mount you have nothing to fear.",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE),
Material.FIREWORK, (byte) 0, -7, Horse.Color.WHITE, Horse.Style.WHITE, Horse.Variant.HORSE, 1, null);
UtilText.splitLinesToArray(new String[]{C.cGray + "You know the cow that jumped over the moon? Total show off."}, LineFormat.LORE),
Material.CAULDRON, (byte) 0, -7, Horse.Color.WHITE, Horse.Style.WHITE, Horse.Variant.HORSE, 1, null);
}
@Override

View File

@ -33,7 +33,7 @@ public enum PetType
GINGERBREAD_MAN("Gingerbread Man", EntityType.ZOMBIE, -16, "Looks like you can catch him after all."),
CUPID_PET("Cupid", EntityType.ZOMBIE, -17, "Sometimes you need a little extra help finding true Love. Why not have Cupid help you out?", Material.BOW, (byte) 0),
TRUE_LOVE_PET("True Love", EntityType.ZOMBIE, -14, "Sometimes love means chasing the person of your dreams until you catch them.", Material.APPLE, YearMonth.of(2017, Month.FEBRUARY)),
LEPRECHAUN("Leprechaun", EntityType.ZOMBIE, -18, "Placeholder", SkinData.LEPRECHAUN.getSkull())
LEPRECHAUN("Leprechaun", EntityType.ZOMBIE, -18, "Apparently this little guy lost his Pot of Gold in the war.", SkinData.LEPRECHAUN.getSkull())
// TODO CHECK IF LOBBY IS 1.9+
// Not in this update
//SHULKER("Shulker Pet", EntityType.BAT, 0, "Is it a turtle or an alien? Either way its shot can be really UPLIFTING.")

View File

@ -94,6 +94,11 @@ public class BlockChangeAnimation extends Animation
mat = Material.WOOL;
data = 6;
}
else if (getTreasure().getTreasureType() == TreasureType.ST_PATRICKS)
{
mat = Material.WOOL;
data = 13;
}
else
continue;
@ -141,6 +146,11 @@ public class BlockChangeAnimation extends Animation
mat = Material.WOOL;
data = 14;
}
else if (getTreasure().getTreasureType() == TreasureType.ST_PATRICKS)
{
mat = Material.GOLD_BLOCK;
data = 0;
}
else
continue;

View File

@ -49,15 +49,6 @@ public class BuyChestButton implements IButton
return;
}
if (_chestType == TreasureType.LOVE_CHEST)
{
if (!new File("../../update/files/EnableLoveChest.dat").exists())
{
player.sendMessage(F.main("Treasure", "That chest is no longer available for purchase!"));
return;
}
}
if (_chestType == TreasureType.TRICK_OR_TREAT)
{
if (!new File("../../update/files/EnableTrickOrTreat.dat").exists())
@ -107,7 +98,8 @@ public class BuyChestButton implements IButton
}
if (!_page.getPlugin().hasItemsToGivePlayer(_chestType.getRewardPool(), player)
&& (_chestType == TreasureType.ILLUMINATED || _chestType == TreasureType.OMEGA
|| _chestType == TreasureType.HAUNTED || _chestType == TreasureType.GINGERBREAD))
|| _chestType == TreasureType.HAUNTED || _chestType == TreasureType.GINGERBREAD
|| _chestType == TreasureType.ST_PATRICKS))
{
player.sendMessage(F.main("Treasure", "You seem to have all treasures for this chest unlocked already!"));
return;