public void onPlayerDeath(PlayerDeathEvent e)
if (e.getEntity().getKiller() instanceof Wolf)...
What you need to do is replace "res.next()" with
that makes sure that the result set isn't empty before it performs any mysql...
Try making it check if it's greater than Zero for the if statement. Or, change it to greaterthan-or-equal-to:
if( args.length >= 1 &&...
Instead of creating an itemstack and compairing it to the item they have inhand, try doing this...
You say wrong but don't provide a reason, you're not helping anyone, so if you can't say why then please, don't say I'm wrong.
EDIT: Also, OP....
public static List<String> mgSigns = new ArrayList<String>();
Needs to be:
public ArrayList<String> mgSigns = new ArrayList<String>();
String str = "&4This is red!";
str = ChatColor.translateAlternateColorCodes('&', str);
You could use the PlayerMoveEvent, check if they're sneaking, and if they're then set their speed to 2 or something, and then if they're not...
I saw your other post and was in the middle of creating a reponse to it, anyways here:
Just a theory, try doing this for your plugin.yml
Potions have sub-types, what you can do is:
ItemStack potion = new ItemStack(Material.POTION, <amount>, <subtype>
//If I wanted,...
If you're using Eclipse a cool trick to fix indentation is by pressing "Ctrl+Shift+F" while click in a Code window.
It really doesn't, it's just how I do it(If you need to add more listeners, it lets you type less.)
The best I can think if is "PlayerRightClickEntityEvent"
You could check if the item in their hand is equal to air, and if the entity they right...
Remove the Single quotes from the plugin name
This is the plugin.yml:
name: 'Custom Hats'
Separate names with a comma.