SHATTERED Version - 1.5 Acknowledgements- Trc202 - For Helping Me Figure out the Player Damage Issue. Yes Ive been Realizing that ive been asking For Alot of help. From Now On, Ill Quit Asking for Help and Figure issues out on my own. Description - This Simple Plugin Makes Glass More Realistic By Giving the player damage if the glass is broken by hand. Download - http://dl.dropbox.com/u/1015938/Shattered.jar Latest CB Features - Hurts Player When Glass Is Broken With Player Hands Glass Must Be Broken With Tools Now Todo - Try and Make a Config For The Messages/Damage Ran Into an Issue? - CB Version The Issue Other Plugins You Are Using Changelog: Version 1.0 CB 928 Version 1.5 cb 928 fixed Odd Coding Error. Eclipse Showed Correct Code but Jar Didnt. BTW- If Message On player Damage is a bit harsh, let me know and ill fix that. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
just a thought but Code: public void onBlockBreak(BlockBreakEvent event) { Player theplayer = event.getPlayer(); if(theplayer.getItemInHand().getType() == Material.AIR) { if(event.getBlock().getType() == Material.GLASS) { theplayer.damage(1); } theplayer.sendMessage("Damn Should Of Used a Tool Instead."); } } should be Code: public void onBlockBreak(BlockBreakEvent event) { Player theplayer = event.getPlayer(); if(theplayer.getItemInHand().getType() == Material.AIR) { if(event.getBlock().getType() == Material.GLASS) { theplayer.damage(1); theplayer.sendMessage("Damn Should Of Used a Tool Instead."); } } }
-_- ok whatever ill fix it. i Dont see the issue. The Point is i want the message to show when the player is hurt. Wtf this isnt what my code looks like on the eclipse. the *correct* way matters wants it to be is what i have on my pc not on the jar file. hmm odd
wow, damn i must of been tired last night. anyways i uploaded the correct code that is on my eclipse.
On [MISC-FUN-RPG], instead use [MISC/FUN/RPG]. I'm not sure if it matters, but just letting you know.
I like this, You should add permissions for those who wont take damage from breaking glass with hand. Like servers with VIP/mod+ groups.
Hey, i´m sorry im from germany i cant speak english very good how i can change the text Damn Should Of Used a Tool Instead.? must i copy the code in the .jar file ?