Added flower as a hat

This commit is contained in:
LCastr0 2017-03-18 00:49:12 -03:00
parent d8b68e4716
commit e1d9a568c9

View File

@ -8,11 +8,14 @@ import java.util.Map;
import org.bukkit.Material;
import org.bukkit.entity.Player;
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.gadget.GadgetManager;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.OutfitGadget;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.particleeffects.ColoredCircleEffect;
import mineplex.core.updater.event.UpdateEvent;
@ -32,11 +35,14 @@ public class ParticleSpringHalo extends ParticleGadget
public void enableCustom(Player player, boolean message)
{
super.enableCustom(player, message);
Manager.removeGadgetType(player, GadgetType.MORPH, this);
Manager.removeOutfit(player, OutfitGadget.ArmorSlot.HELMET);
ColoredCircleEffect circleEffect = new ColoredCircleEffect(Manager.getPlugin(), player, 0.7d, false,
Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW);
circleEffect.setYOffset(2.3d);
circleEffect.start();
_effects.put(player, circleEffect);
player.getEquipment().setHelmet(new ItemStack(Material.RED_ROSE, 1, (byte) 8));
}
@Override
@ -52,6 +58,7 @@ public class ParticleSpringHalo extends ParticleGadget
}
}
_effects.remove(player);
player.getInventory().setHelmet(null);
}
@Override