Add descriptions to traps
This commit is contained in:
parent
b761ae30ce
commit
84afbc242d
@ -8,6 +8,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
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;
|
||||
@ -17,7 +18,10 @@ public class CakeBearTrap extends CakeTrapItem
|
||||
|
||||
public CakeBearTrap(int cost)
|
||||
{
|
||||
super(new ItemStack(Material.TRIPWIRE_HOOK), cost, "Bear Trap");
|
||||
super(new ItemStack(Material.TRIPWIRE_HOOK), cost, "Bear Trap",
|
||||
C.cWhite + "When a player attempts to eat your Cake.",
|
||||
C.cWhite + "They are blinded and slowed for " + C.cGreen + "4 Seconds" + C.cWhite + "."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -25,8 +29,7 @@ public class CakeBearTrap extends CakeTrapItem
|
||||
{
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 2, 1);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1.5, 0), 0.25F, 0.25F, 0.25F, 0.5F, 30, ViewDist.NORMAL);
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 80, 2));
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 80, 0, false, false));
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 80, 4));
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 80, 0, false, false));
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
@ -18,7 +19,10 @@ public class CakeTNTTrap extends CakeTrapItem
|
||||
|
||||
public CakeTNTTrap(int cost)
|
||||
{
|
||||
super(new ItemStack(Material.TNT), cost, "TNT Trap");
|
||||
super(new ItemStack(Material.TNT), cost, "TNT Trap",
|
||||
C.cWhite + "When a player attempts to eat your Cake.",
|
||||
C.cWhite + "They are thrown into the air!"
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,8 @@ 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.itemstack.ItemBuilder;
|
||||
|
||||
import nautilus.game.arcade.game.games.cakewars.shop.CakeShopItem;
|
||||
@ -15,10 +17,11 @@ public abstract class CakeTrapItem extends CakeShopItem
|
||||
|
||||
private final String _name;
|
||||
|
||||
CakeTrapItem(ItemStack itemStack, int cost, String name)
|
||||
CakeTrapItem(ItemStack itemStack, int cost, String name, String... description)
|
||||
{
|
||||
super(CakeShopItemType.TRAP, new ItemBuilder(itemStack)
|
||||
.setTitle(C.mItem + name)
|
||||
.setTitle(C.cYellowB + name)
|
||||
.setLore(UtilText.splitLinesToArray(description, LineFormat.LORE))
|
||||
.build(), cost);
|
||||
|
||||
_name = name;
|
||||
|
Loading…
Reference in New Issue
Block a user