Hello. I've recently came up with this idea after recently enforcing my Facebook account with a text message-password system for verification....
You should have a method that allows you to perform queries...
You'd listen for the PlayerInteractEvent, check if the item in the Player's hand is whatever type of axe, and get the mob in front of the player...
ial1010 You'd have to listen for that in InventoryClickEvent and open a new inventory GUI.
Where he means put your check for the right metadata magic keyword here is to check if the item you are wanting to make infinitely durable is...
At least the item naming work'd :D.
[IMG]
Feel free to use this code: // Place this snippet in whichever method or event you use to give the player a sword. Eg. onCommand() Player...
Ever wanted to create a game network similar to Shotbow, McPVP, or Minecade? Well, let's get this straight, they've all worked hard to get where...
Register the event. Your code is fine.
use event.setCancelled(true); on top of learning the PlayerInteractEvent first, which chasechocolate has posted for you :P
Can't we use if (event.getPlayer().isBlocking()) ?
Updated it after testing in Eclipse. Should work and it's good to go! You're welcome and happy coding :)
Here you go, feel free to use this: // Add this variable at the top of your class public static Inventory inv = null; // Your onEnable()...
Separate names with a comma.