Advertisement
Guest User

Untitled

a guest
May 19th, 2016
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.chromenized.custome;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7. import org.bukkit.event.Listener;
  8. import org.bukkit.inventory.ItemStack;
  9. import org.bukkit.inventory.PlayerInventory;
  10. import org.bukkit.plugin.java.JavaPlugin;
  11.  
  12. public class CustomEnchants extends JavaPlugin implements Listener {
  13.  
  14. public void onEnable() {
  15. Bukkit.getServer().getPluginManager().registerEvents(this, this);
  16. }
  17.  
  18. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  19.  
  20. if(!(sender instanceof Player)){
  21. return true;
  22. }
  23.  
  24. Player p = (Player) sender;
  25.  
  26. if(cmd.getName().equalsIgnoreCase("axe")){
  27. PlayerInventory pi = p.getInventory();
  28. ItemStack itemStack = VanillaEnchant.item();
  29. }
  30.  
  31. return false;
  32.  
  33.  
  34.  
  35. }
  36.  
  37.  
  38. }
Advertisement
RAW Paste Data Copied
Advertisement