SWatchdog
SWatchdog is now Abandonware, how cool is that?
Version: 1.19
Tekkit version 1.13Tekkit - Optimized for Tekkit, not recording machines.
This plugin will record all the broken and placed blocks, with their subtypes, person who broke/placed them & time and date when this happened. Also options for chest access logging as well as animal slaughter logging. There is also functionality to rollback said actions, re-place broken blocks, remove placed blocks ect. Its aimed to be lightweight, since bigbrother, while good, lagged any server I could see it used on. And while there are other block-logging plugins, most of them had sides that didn't appeal to the servers (where I work) owner. Like require the admin to setup the SQL database, the plugin connects to an external database the whole time, or the plugin is way outdated. And other problems like that, so I made SWatchdog. To keep it simple and efficient. We've been using/testing SWatchdog for some time now, and it seems to be a success. No lag whatsoever.
How to reach me
If you have any questions what so ever, have any problems with SWatchdog or want to give feedback / make a suggestion, you can either:
Send me PM here. Thats the most certain way to reach me, since I'm checking my PM's here every once in a while. (Note, a PM at BukkitDev, not a convo at Bukkit.)
Or you can try to reach me at -Server not public yet- ( - or the website ) for the most immediate and clear conversation. ( 0Given that I am online. ^_^ )
Recent changes
- Full control of what you want to record. (Though I doubt anyone would want to log only decaying leaves, even that is possible.)
- Rollback specified players, or blocks, or specified blocks placed by specified players. In the specified area after specified time. Yes, you can now be just about as specific as you want.
- Added automated log-cleaning as an option
- Added a powerful tool for checking the files integrity, option to do this automatically on server restart (and plugin reload) and to repair it (automatically)
- Entering incorrect parameters for a command now automatically shows relevant help to that command.
- Added chest access -logging as an option. Its defaulted to false, so if you want it, just enable it in the config.
- Added chest access -logging results to /sniff look and /supersniff look
- Added /wutil repairintegrity to easily make sure everything is as it should be.
- Added a method to change configs ingame. Yay!
- Added the stick. As an option. You need to enable it and give yourself the perm.
- Rolling stuff back now recognizes failed rollbacks (0 blocks) and suggests what might've gone wrong. (Like giving too specific criteria for example.)
- Added animal slaughter logging
- option to preview rollback before rolling back.
- Improved /WTrack
- Optimized single block sniffing, now faster than ever.
- Optimized WXRay
- ADDED PlayerUndo /WUndoP and PlayerClean /WCleanP to easily rollback spesific players.
- Major optimization, commands run in threads now.
Please note
- Please use uptodate permission plugin. Outdated permission plugins may be unable to handle the latest bukkit permission format. So please make sure your permission plugin is updated to latest R#. If there is no update, just notify the author of the permission plugin to update.
Video Tutorials
These awesome videos came from InstitutionAwesome. Many thanks!
Config
Features
- Everything runs in threads for improved stability
- Option to preview rollbacks.
- Rollback areas on single players
- Records broken and placed blocks on the map
- Records exploded, burned and decayed blocks on the map
- Records water and lava
- Records players accessing chests
- Records endermen breaking blocks, blocks forming and spreading naturally, trees growing, ect.
- Config options for different kinds of events to log. Log what you want!
- Aims to be as light and nonlagging as possible
- Has a powerful indexing system, so it doesn't matter if you have 200 000 or 20 000 000 blocks recorded when you do rollbacks.
- Allows you to rollback ALL the actions of a specific player, with proper security clearance.
- Has automated log-cleaning, as well as manual. Both optional.
- Allows to rollback placed/broken blocks on specified area
- Allows you to rollback specified block type, placed/broken by specified player, on specified area.
- Allows to check single blocks or multiple blocks at a time
- Allows you to track activities of a specific player
- Allows you to check entries by a blocktype
- Allows you to estimate how well it is working on your server, this may also reflect lag caused by other plugins
- Allows to check % of valuable minerals mined by a person below 30Y
- Allows to check slaughtered animals.
- Records all your worlds, commands are relative to the world you are in.
- Failsafe. If SWatchdog encounters an error while running, it will attempt to fix most of the errors. If the error is severe, and it cannot fix it, it will disable it self. (If you find an error it doesn't understand, let me know. I will add it to the list)
- Option for automated log integrity check, and further option for automated log-repair, so even if you managed to blow up your database, it should be no problem.
Enabling wand
- Do /whelp 10 ingame, then follow the instructions. And yes, you can do everything from ingame.
Planned features
- Some sort of super-rollback feature to determine what an area looked like at given point in time, and then remake it
- Make WXRay better, show example locations ect
- Give an option to sort the results of sniffing to a file, so you can go through them (enterrandomamounthere) at a time.
- Add an option to notify admins when certain blocks are being placed.
- Add a thread for warning about possible xrayers
- Dragon egg teleport logging, as an option for creative servers.
- Logging only certain worlds
- WorldEdit logging. Purely as an option, disabled by default.
- Fixing few minor bugs in 1.18
- Suggestions?
Currently working on
- Option to warn when diamonds are being mined
- Option to warn when gold blocks are being mined.
Permissions & commands
Guide to time, rollbacks and some other examples
Can now be found here.
The config file
Installation
Place SWatchod.jar in plugins folder. Enjoy!
In case of a bug-attack
If you encounter a bug, unexpected behaviour or believe something is wrong, please:
- Look at console while running a command, if it fails to run it, it should report there with possibly the reason for what happened.
- Tell the contents of /plugins/swatchdog/ to me via PM or post a message below.
- Tell the latest ID from /plugins/swatchdog/util/ lastIDbroke.world and lastIDplaced.world (or the ID's for a different world, if thats where the problem occurs.)
- Describe your world, is it the default world? Whats its name?
- Post the content of config file, in the util folder
- SWatchdog version you are using, and bukkit version you are using. I have a deep interest in solving any and all bugs you might encounter, so please, just tell about them.
Known problems
- Doors do not rollback correctly. (Only the half that was broken/placed is rolled back.)
- /sniff look is not a waterproof command, so don't use it underwater.
Requirements
Please use the (craft)bukkit version mentioned in the file.
If I destroy something that was built before SWatchdog was installed I am not able to restore it. It does not log the blocks as being destroyed.
Example: I install SWatchdog. I destroy a house built before SWatchdog was installed with TNT.
Is this intended functionality?
@xdeathoreox
This plugin DOES log lava and water placement (I have confirmed it), so there must be something wrong on your end. Try using supersniff instead, because if they griefed with lava and you enabled lava logging (Or even if you didn't) then there is a very good chance that it clogged your logs and caused them to be split many times, which means that you would need to use supersniff for it to show up. Also, try looking directly at the lava block and typing "/swss l".
I guesse this doesn't pick up on lava and water placement. Because someone griefed the server with lava and I tried to do /sniff placed radius and it didn't find it. It was fairly recent to.
@Sanzennin
Nope, there's no tree growth error anymore. Thanks for fixing that.
@Godhand205
Instead of hitting stuff with items, please look at the block you wish to inspect and type /sws l,
since the problem with tools is, it adds a huge amount of completely wasted if-cases. Its not much, but I don't want to start wasting resources when not absolutely necessary. (And when its necessary, its not wasting.)
Trying to keep the plugin as lagfree as possible.
(I can't tell the plugin to "Only run right_click check when an admin or mod hits a block with stick." Since there is no way the plugin would know who is admin or mod, and if they are wielding a stick, without looking at the players hand (thats one check) and if there was a stick then asking your permission plugin if the player is admin or mod. (Has the right permission). So, the "does this guy have a stick?" check would pretty much run all the time (People like clicking stuff.) and when there is some nutjob who just likes hitting stuff with a stick, the plugin would frequently ask your permission plugin if he has the permission to run checks with a stick.)
@Hoot215
Ah, I guess explosions need an extra check too. (Do you get treegrowth errors anymore tho?)
Bug: Whenever a ghast fireball blows up blocks:
[SEVERE] Could not pass event org.bukkit.event.entity.EntityExplodeEvent to SWatchdog
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:453)
at net.minecraft.server.Explosion.a(Explosion.java:189)
at net.minecraft.server.World.createExplosion(World.java:1529)
at net.minecraft.server.WorldServer.createExplosion(WorldServer.java:229)
at net.minecraft.server.EntityFireball.a(EntityFireball.java:218)
at net.minecraft.server.EntityFireball.y_(EntityFireball.java:132)
at net.minecraft.server.World.entityJoinedWorld(World.java:1258)
at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:110)
at net.minecraft.server.World.playerJoinedWorld(World.java:1240)
at net.minecraft.server.World.tickEntities(World.java:1147)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:528)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
... 14 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at me.Sanzennin.SWatchdog.Watcher.onExplode(Watcher.java:113)
... 18 more
I love this plugin. I think its one of the best ones out there. I only wish it could record events before put into the plugins folder. Aside from that, I love this tool and hope you continue to update it in the future. Maybe though, do you think you could make a certain item detect broken/placed blocks like Logblock? That would just make this plugin so much easier/quicker to use. +1 diamond for you.
@Hoot215
Nah, I'm not big fan of "just roll over and die" kinda actions... :/
Besides, it would probably take them some while to understand how my code works, and I would probly have made an update by then.
Or maybe work with my apprentice on this one? Though he seems to be even more busy than I am.
<<reply 536306="">>
Could you maybe release the source code then? So other people could update it?
Next update estimate is tuesday. 14.2.2012 (Very busy irl untin then.)
@Dudescast
Well, there exists options to record certain events, and I am thinking of making config flags for every event that swatchdog handles.
Currently, you can toggle between recording water and lavaspreading, blocks spreading and forming, NPC's changing blocks, block physics. (All of these are defaulted to false in config, since I do not think they are so overly important. But someone might, and therefore, there is option to enable these.)
I am planning flags for (all of these have hardcoded true atm): Toggling between enderman picking stuff up, explosions, placed and broken blocks by players, tree growth, water and lava placement by players.
There is no straight option to ignore blocktypes, since the event is already called, and checked, so not recording anything would just waste resources.
As for the size of the database, well, 5Mb is not really that large, (Originally, I had filesizes like 50Mb, and this didn't slow it down one bit.)
Thought, with large database, entering specific search criteria becomes rather important. (That is, don't go to the center of the map and sniff with radius 2000 100 ;) )
To ease this, I am planning a pagesystem that allows you to search the database at ease.
Ofcourse, if you do not like 5Mb text files, you can tune up the split rate. To do this, use "splits=100" in the config. Make it 50 to get 2.5Mb sizes, or 10 to get 0.1Mb files... Ofcouse, that way you would have 10 times the amount of files.
You didn't answer my first question, which was: "Can you record only certain blocks?" Since recording everything quickly becomes some huge text documents!
And sure I will post any results when I get the time to test it.
@Hoot215
Yeah, I know. Storing to a temporary file is how I am going to do it. There is no other way to make it reasonably, without wastin resources.
Thought instead of the first page, I'm thinking I'll show user some instructions on how to use the pages...
<<reply 534209="">>
Yeah, looks awesome. Pages would be good :) I'd probably recommend something like how LogBlock does it, look up the results first (And display the first page to the user), then store them temporarily for later use in a "/wpage [Page #]" command or something, to view the pages in the last search. This prevents wasting resources looking up all the data again.
@Hoot215
Hehe, well, now you got the option to log the extra stuff, if you want.
Next up: Maybe the pages for search functions?
<<reply 534204="">>
I was just about to reply to him... lol. Well anyway, nice job on the new version. Going to test it now (Well maybe not RIGHT now, but you get the idea. Sometime between now and tomorrow).
@EroOu
Oh, if its just lava you want, change WatchLava=false to WatchLava=true, if its lava AND water you want, use WatchWaterLava=true isntead.
Just updated to 0.97. :)
Awesome plugin, thank you for your hard work! :D
How do I enable lavalogging tho?
@Ktoss
That is odd, SWatchdog uses standard Bukkit permission types... Are you sure PEX supports the new bukkit permission format? (SWatchdog should be permissionplugin neutral, usable with any permission plugin.)