Advertisement
T0X1C0801

Code

Mar 21st, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. package me.T0X1C.Picksell;
  2.  
  3. import me.mrCookieSlime.QuickSell.Shop;
  4.  
  5. import org.bukkit.Material;
  6. import org.bukkit.enchantments.Enchantment;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.event.EventHandler;
  9. import org.bukkit.event.Listener;
  10. import org.bukkit.event.block.Action;
  11. import org.bukkit.event.player.PlayerInteractEvent;
  12. import org.bukkit.inventory.ItemStack;
  13. import org.bukkit.inventory.meta.ItemMeta;
  14. import org.bukkit.plugin.java.JavaPlugin;
  15.  
  16. public class Main extends JavaPlugin implements Listener {
  17.  
  18. public void onEnable() {
  19. getServer().getPluginManager().registerEvents(this, this);
  20. getServer().getLogger().info("§3§lOP §b§lPrison §8- §7Picksell Enabled!");
  21. }
  22.  
  23. public void onDisable() {
  24.  
  25. }
  26.  
  27. @EventHandler
  28. public void PlayerInteract(PlayerInteractEvent e) {
  29. Player player = e.getPlayer();
  30. ItemStack Starter = new ItemStack(Material.DIAMOND_PICKAXE, 1);
  31. ItemMeta StarterMeta = Starter.getItemMeta();
  32. StarterMeta.setDisplayName("§8» §b§lStarter §8«");
  33. Starter.setItemMeta(StarterMeta);
  34. Starter.addUnsafeEnchantment(Enchantment.DIG_SPEED, 100);
  35. Starter.addUnsafeEnchantment(Enchantment.DURABILITY, 10000);
  36. Starter.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 25);
  37. ItemStack Vip = new ItemStack(Material.DIAMOND_PICKAXE, 1);
  38. ItemMeta VipMeta = Vip.getItemMeta();
  39. VipMeta.setDisplayName("§8» §6§lVip §8«");
  40. Vip.setItemMeta(VipMeta);
  41. Vip.addUnsafeEnchantment(Enchantment.DIG_SPEED, 2000);
  42. Vip.addUnsafeEnchantment(Enchantment.DURABILITY, 10000);
  43. Vip.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 300);
  44. Shop shop = Shop.getHighestShop(player);
  45. if(shop == null) {
  46. player.sendMessage("§cShop not found!");
  47. return;
  48. } else if(e.getAction() == Action.RIGHT_CLICK_AIR && (e.getAction() == Action.RIGHT_CLICK_BLOCK) && e.getPlayer().getItemInHand().equals(Material.DIAMOND_PICKAXE)) {
  49. shop.sellall(player, "");
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement