Advertisement
Guest User

Code

a guest
Apr 11th, 2015
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.40 KB | None | 0 0
  1. package pl.lifeinprison.BLEEP_BLOOP;
  2.  
  3. import org.bukkit.Material;
  4. import org.bukkit.inventory.ItemStack;
  5. import org.bukkit.inventory.ShapedRecipe;
  6. import org.bukkit.inventory.meta.PotionMeta;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8. import org.bukkit.potion.Potion;
  9. import org.bukkit.potion.PotionEffect;
  10. import org.bukkit.potion.PotionEffectType;
  11. import org.bukkit.potion.PotionType;
  12.  
  13. public class AlcoholDrinks extends JavaPlugin {
  14.     public void onEnable() {
  15.         ItemStack whiskeystack = new Potion(PotionType.INSTANT_DAMAGE).toItemStack(1);
  16.         PotionMeta whiskey = (PotionMeta) whiskeystack.getItemMeta();
  17.         getLogger().info("Plugin Enabled");
  18.         ShapedRecipe whiskeyrec = new ShapedRecipe(whiskeystack);
  19.         whiskey.addCustomEffect(new PotionEffect(PotionEffectType.SPEED, 330, 3), true);
  20.         whiskey.addCustomEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 120, 1), true);
  21.         whiskey.addCustomEffect(new PotionEffect(PotionEffectType.BLINDNESS, 5, 1), true);
  22.         whiskey.addCustomEffect(new PotionEffect(PotionEffectType.CONFUSION, 45, 5), true);
  23.         whiskeystack.setItemMeta(whiskey);
  24.         whiskeyrec.shape("cab","ada","cab");
  25.         whiskeyrec.setIngredient('a', Material.POTION);
  26.         whiskeyrec.setIngredient('b', Material.WHEAT);
  27.         whiskeyrec.setIngredient('c', Material.POTION);
  28.         whiskeyrec.setIngredient('d', Material.POTION);
  29.     }
  30.  
  31.     public void onDisable() {
  32.         getLogger().info("Plugin Disabled");
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement