Giter Site home page Giter Site logo

t0x1c0801's Projects

pickaxesell icon pickaxesell

package MAIN; import me.mrCookieSlime.QuickSell.Shop; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.plugin.java.JavaPlugin; public class MAIN extends JavaPlugin implements Listener { public void onEnable() { getServer().getPluginManager().registerEvents(this, this); getServer().getLogger().info("§3§lOP §b§lPrison §8- §7Picksell Enabled!"); } public void onDisable() { } @EventHandler public void PlayerInteract(PlayerInteractEvent e) { Player player = e.getPlayer(); Shop shop = Shop.getHighestShop(player); shop.sellall(player, ""); ItemStack Starter = new ItemStack(Material.DIAMOND_PICKAXE, 1); ItemMeta StarterMeta = Starter.getItemMeta(); StarterMeta.setDisplayName("§8» §b§lStarter §8«"); Starter.setItemMeta(StarterMeta); Starter.addUnsafeEnchantment(Enchantment.DIG_SPEED, 100); Starter.addUnsafeEnchantment(Enchantment.DURABILITY, 10000); Starter.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 25); ItemStack Vip = new ItemStack(Material.DIAMOND_PICKAXE, 1); ItemMeta VipMeta = Vip.getItemMeta(); VipMeta.setDisplayName("§8» §6§lVip §8«"); Vip.setItemMeta(VipMeta); Vip.addUnsafeEnchantment(Enchantment.DIG_SPEED, 2000); Vip.addUnsafeEnchantment(Enchantment.DURABILITY, 10000); Vip.addUnsafeEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 300); if(shop == null) { player.sendMessage("§cShop not found!"); return; } else if(e.getAction() == Action.RIGHT_CLICK_AIR && (e.getAction() == Action.RIGHT_CLICK_BLOCK) && e.getPlayer().getItemInHand().equals(Material.DIAMOND_PICKAXE)) { shop.sellall(player, ""); } } }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.