Hi all! I need a simple plugin that logs the creeper activator's name. So if i activate a creeper and it explodes,then it should add a line to the log file like: [TIME] Player activated a Creeper at x,y,z. Would be good if a log will log only like 100 activate,after this it would create a new log file. Like creeper_1.log reaches 100 log,then the plugin would create a new file: creeper_2.log and log to it. Thanks a lot!
Umm ok,i just searched in google. I hope this can help : Code: String line; while((line= bufreader.readLine()) != null) if (line.trim().length() != 0) return line; Thanks!
Sorry I was a bit unclear I mean when writing to a text file to know which line to start with say if some lines are already writin
Oh yeah I can do that easily. And when you send something to the console I'm pretty sure it shows in the serverlog too btw. Almost done. Here you go: <Edit by Moderator: Redacted mediafire url> I also realised that time is already included in the server log so I did not add that. ENJOY! (and like) When someone triggers a creeper explosion it will display this on the log: (this is the time btw-->)00:00:00 [LogCreeper] playerName has activated a creeper on world 'worldname' at x-idk y-idk z-idk! EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Awww that sounds cool,but i get some error when i start the server =( Code: 2012-03-20 16:04:40 [INFO] This server is running CraftBukkit version git-Bukkit-1.2.3-R0.2-b2060jnks (MC: 1.2.3) (Implementing API version 1.2.3-R0.2) 2012-03-20 16:04:41 [SEVERE] Could not load 'plugins\LogCreeper.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/bluemond/LogCreeper/LogCreeper : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:150) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:287) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:211) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:56) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.UnsupportedClassVersionError: me/bluemond/LogCreeper/LogCreeper : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:139) ... 8 more
Weird I tested it on my server and it worked fine.. Let me check it and repost it Ok I retried it and it worked so just incase I deleted the current mediafire download and reuploaded it: <Edit by Moderator: Redacted mediafire url> If it doesn't work for you it must be a problem on your side. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Ok i placed the craftbukkit to a new folder,runned it,full fresh server,placed the jar file to the plugins and same error. I've tried it with 1.2.3 R0.1 and with 1.2.3 R0.2 on windows 7 (tried on linux 1.2.3 R0.1 too) but same error =( Code: Caused by: java.lang.UnsupportedClassVersionError: me/bluemond/LogCreeper/LogCreeper : Unsupported major.minor version 51.0 With Plugman : Code: 22:10:38 [INFO] File exists, but is not a plugin file. Hmmm,unsupported class version? confused =( Is this need something library or other plugin to work?
I know the problem. Either... BlueMond416 compile it with Java 1.6 Or... newboyhun update to Java 1.7 I've experienced this before, BlueMond416 if you release this to the public you should compile with Java 1.6
Oh yeah srry I am using java 1.7 Sayshal But how do I downgrade? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Uninstall your old Java and install Java 1.6 from their website. (I think you can also just download the java1.6.jar and use it as a library but I don't know sorry.)
I'm just not gonna downgrade newboyhun will just haev to update cus the host of the private server I develope for has 1.7 so don't need to.
I see,problem is where i want to use this plugin,that server is running on linux :S And i don't want to upgrade it to java 1.7 because the owner of the server computer will kill me :S EDIT:It would be nice if you upload the source,then i recompile it with JCreator,thanks!
Sayshal I'm pretty sure my compiler is still 1.6 but just to make sure I redownloaded 1.6 and changed my compiler path to that bin and I will now try one last post This should work, if not you must be doing something wrong because I change my path to 1.6 and my SE on eclipse to 1.6 and had them all rebuilt so here: <Edit by Moderator: Redacted mediafire url> EDIT by Moderator: merged posts, please use the edit button instead of double posting.