Removed firework from party death

Replaced the death effect with item drops instead
This commit is contained in:
xGamingDudex 2016-05-06 13:12:28 +02:00
parent d60fea4f76
commit f58db6ee3b

View File

@ -1,19 +1,13 @@
package mineplex.core.gadget.gadgets.death;
import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.entity.Player;
import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.blood.BloodEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilItem;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DeathEffectGadget;
@ -34,31 +28,11 @@ public class DeathPinataBurst extends DeathEffectGadget
public void onBlood(Player player, BloodEvent event)
{
event.setCancelled(true);
Color[] colors = new Color[10];
for(int i = 0; i < colors.length; i++) {
colors[i] = Color.fromRGB(UtilMath.r(255*255*255));
}
UtilFirework.playFirework(event.getLocation(),
FireworkEffect.builder().flicker(true).trail(true).withColor(colors).with(Type.BURST).build());
for(int i = 0; i < colors.length; i++) {
colors[i] = Color.fromRGB(UtilMath.r(255*255*255));
}
UtilFirework.playFirework(event.getLocation().add(0, 1, 0),
FireworkEffect.builder().flicker(true).trail(true).withColor(colors).with(Type.BURST).build());
for(byte data : _data)
for(byte d : _data)
{
UtilItem.dropItem(new ItemStack(Material.WOOL, 1, (short)0, data), event.getLocation(), true, false, 20*3, false);
ItemStack item = new ItemStack(Material.INK_SACK, 1, (short) 0, d);
UtilItem.dropItem(item, event.getLocation(), true, false, 40, false);
}
for(Material m : new Material[]{Material.SUGAR, Material.PUMPKIN_PIE, Material.CAKE})
{
for(int i = 0; i < 3; i++)
{
UtilItem.dropItem(new ItemStack(m), event.getLocation(), true, false, 20*3, false);
}
}
}
}