AutoMod
Description
This plugin attempts to do the work of the server admins and moderators automatically allowing them more time to play the game and protecting the server when no staff can be online. Like all of my plugins this was made for use of my public server, and is being release as it seems that there is nothing else that does this.
When a player joins they are watched for a while, more details of what is watched is given below but put basically their play style is analysed to see if it matches that of the common greifer. If they are found to be in violation of one or more of the checks the build permissions are removed, this means that they cannot break or place blocks or in fact interact with anything. It's possible that legit players will be detected, to prevent this being too much of a pain for new players they are offered the chance to use the /build command to ask for their permissions back, this allows the other users on the server to vote if they think the user should have their permissions back. A 100% yes vote means that all of the checks are reset. Permissions can be used to create a trusted group of players that are watched and who can vote.
Bug Reports / Suggestions
If you find a bug, encounter a problem or have a suggestion, please fill out a ticket via the Tickets link above. I do not have the time to read through the comments section, any comment that fits the previous three categories will be ignored.
Does it Work ?
The short answer is that it works on the dumb people, and they happen to be the most irritating. Anyone that has the sense to look a the plugin list will know they just have to dig a large amount of dirt to avoid being detected. Others may try to use alternate account after working out that can break a few blocks per account, hopefully they will get bored.
Checks
Block Types
The main check that is performed is related to the blocks that the player breaks, if they break any unnatural blocks before they become trusted they are given a block place violation. More than 8 of these violations means that they blocked. It's likely that any block that is not generated naturally in the world will be part of a building.
LogBlock
This goes with the above, if the players breaks more than 8 blocks that were placed by another player before becoming trusted they get blocked.
NoCheat
If the player appears to be using some of the common hacks included in griefing clients when breaking a block they are instantly blocked. Data from the plugin NoCheat is used for this check.
Chest Access
If the players removes items from a chest before they are trusted they are blocked.
Permissions
automod.watch.all - Players with this permissions will have all of the available checks performed. Defaults to false.
automod.watch.build - Players with this permission will have the type of blocks that they break analysed. Defaults to false.
automod.watch.logblock - Players with this permission will have the owner of the blocks they break checked. Defaults to false.
automod.watch.nocheat - Players with this permission will have their data from NoCheat analysed. Defaults to false.
automod.watch.chests - Players with this permission will have their chest access watched, if they take items from chests too early on they are blocked. Defaults to false.
automod.admin.vote - Players with this permission will be given the opportunity to vote to give a player their build permission back. (recommended for members or trusted players) Defaults to ops only.
automod.admin.data - Players with this permission can use the /data command to view the data that caused the player to be blocked. This should be given to the players with the vote permission and also defaults to ops only.
automod.admin.lists.all - Allows the player to modify all lists, defaults to ops only.
automod.admin.lists.blocked - Allows the player to modify the blocked player list, defaults to false as it's covered by the above.
automod.admin.lists.trusted - Allows the player to modify the trusted player list, defaults to false as it's covered by the above.
Commands
/build - Used by players to ask for their permissions back.
/vote - Used by trusted players to vote, usage information given in game.
/data - Shows the data that caused the given player to be blocked, useful when voting.
/list - Used to add or remove players from the trusted or blocked list.
/trustallplayers - Adds all players that have ever been on the server to the trusted list, can be useful if you have an established and trusted player base already.
Contributing
Contributions to the project are very much welcome, if you have a feature that you want implemented and know a nice way to do it then consider forking the repo and submitting a pull request. These will be accepted as long as the following simple guidelines are followed.
- Do not edit the structure of the pom.xml file, feel free to add a dependency if you need it but the formatting and structure should not be changed.
- If you are exposing a new API method, add a JavaDoc comment to it, but don't over-comment internal code.
- Follow the existing code style, don't antagonise over every space though !
All dependencies that are used are now available from a public Maven repo, so you don't have to worry about building several other projects just to add a simple change any more.
Source Code
Dev Builds
Changes Since Last Release
Download
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
http://bukkit.jacekk.co.uk:8000/job/AutoMod/
@wide_load Okay, I'll do that. Thanks.
Any chance you could add a config option to allow/deny taking from farms?
EDIT: Added as a ticket for this, and the others, along with a request to add support for an additional logging plugin called 'Prism'.
@zedadiaswick
The docs will be updated when a release version is uploaded there are a whole load of new features that need explaining :)
I can, but it would be good if you could make a ticket about it or I'll forget :P
Crops are not considered natural blocks so if the first thing the player does it dig up a farm they will be blocked.
Couldn't find any docs for the new build-removed-commands config option on how add the player name to the command, had a look through your commits on Github to find it (%player_name% in command = playerName). Should add instructions on how to use that option ;)
Could you also add a way to add the reason to the command? I want to add build permissions removed events to my logs. Similarly, an on build rights returned command and an on trusted/untrust command would also be helpful too :)
Not sure if this has changed in the recent builds, but last I checked some farm items like carrots and potatoes lose players their build permissions. I think they shouldn't :)
@abcedea
That sounds like something you should get MultiCraft to fix :/
@xBrandonGordon
What unapproved links ? You are allowed to link to a CI server just not directly to files. :)
Awesome plugin! If i could suggest something... Take the links to unnaproved builds off before the bukkit dev staff do :P
@gabrielisocool
:P Thanks.
not bad.. not bad at all!
When is this gonna be fixed? Oh, it's fixed. Thanks for the fast update!
@wide_load
Yes please fix that.
@Pixiyo
Hmmmmm I may need to make another change :P It's probably waiting for the player that was blocked to vote.
Ok so we somebody in the server got blocked. (we were with 3 players) 1. 1 player = blocked 2 . 2 players are voting: /vote <name> yes
But then noting happens..
@Pixiyo
Yup, 11 hours ago :P I will, I use it on my server so it would be daft to stop.
@wide_load
Ah nice, you updated it! Thanks dude, keep developing this awesome plugin please! ;)
@WorldOfPoot
Thanks :P
@Pixiyo
Erm, that is probably my fault. Update incoming.
Looks like a cool plugin! The problem is, nobody in my server can vote!
When i type: /vote Pixiio yes then i get: No permissions blalala
It's not even possible to vote in the Console. Any idea how this is possible?
Great plugin, helps me out when my server is overrun with griefers :)
@Pixiyo
Someone has to do /list trusted add <your name> there is not really a way around it :( If you are both new to the server it would probably be okay anyway.
Looks cool! But what if you're with a friend and you're breaking his blocks?
@RasCas
1) Exactly, you only get checked if you have the permission for it.
2) 40 blocks broken. I left that vague because I was planning on making it more complex but never got around to it.