DyeColor color = ((Wool) player.getHelmet().getState().getColor()); if(color == DyeColor.BLUE) { } But make sure you check that the player...
public class Main extends JavaPlugin implements Listener { In your main class, you don't need to implement Listener. @EventHandler public void...
(instance of player).hasPlayedBefore() Will return a boolean, based on the world file you are using.
Not sure why it's not working for you, but may I ask why you're not using runTaskLater()?
if (item.getType() == Material.MONSTER_EGG && item.getData().getData() == (byte)50) Sorry, try that.
You could split up that if statement: if (item.getType() == Material.MONSTER_EGG && item.getData() == (byte)50) Or you could create a new...
Alternatively, you could store entity ID's in an ArrayList. It's probably easier than getting/setting metadata, but it's personal preference really.
What exactly are you planning to do with this? Just curious.
Sorry to break it to you, but no one's going to tell you what all the obfuscated methods do. You can try a few things though: Google it and...
So you might be looking for the method getTargetBlock(). It gets the block in the player's LOS at a specified distance. I.E....
This is odd. [IMG] It definitely worked for me. Technes Could you be using a pre 1.6.2 version of CB?
Okay, I'll try and walk you through this. if (e.getBlock().breakNaturally()) { } This little if statement is not needed. Because you're...
What are you trying to achieve here?
for (ItemStack i : player.getInventory().getContents()) { if (i.getType() == Material.COMPASS) { player.getInventory().remove(i);...
Why not just spawn an arrow every time while listening to PlayerInteractEvent, and create a scheduler to iterate through the player's inventory...
if (!(event.getPlayer().getItemInHand().getTypeId() == 278)) { That little ! negates the if statement. So basically you're checking if the...
In the case that you DID want to store a location, the best way would be storing the world:x:y:z as a string, I just used that as an example. :p...
The setContents() method takes an ItemStack[] array, so you'll need to get the ItemStack[] array from the old inventory....
So I did a quick search and saw that no one has posted a proper tutorial on how to use the Properties class. (Here is some documentation on what I...
I did a quick Google search, and this thread may help you:...
Separate names with a comma.