SimpleWarnings
Description:
SimpleWarnings is just that, a simple warnings system which allows server admins to set, check, and delete warnings.
SimpleWarnings can be easily configured to execute custom commands on warning, auto-ban a user and/or execute a custom command once they've exceeded a pre-defined warning limit, broadcast a users total number of warnings to the server on join, kick a user when they receive a warning and much more...
Quote:Upgrading to 0.8.8 or above?
In Simplewarnings-0.8.8 the data handling is changed from YAML to MySQL/SQLite.
However this doesn't mean you'll lose your previous warning data, as you can update your previous warning records quickly and easily.
To update your warning records to 0.8.8+ compatibility, simply type /fixwarn to begin the update process.
Remember: You only need run it once, and only if you're upgrading from a version earlier than 0.8.8
Installation:
1. Download the .jar
2. Place the .jar in your plugins directory
3. Restart the server
Configuration:
For details on configuration see here: Configuration
Commands: | |
/sw or /warn | View the SimpleWarnings Commands Menu |
/sw reload | Reload Simplewarnings config |
/warn <playername> <warning> | Issue a player with a warning |
/warnings [playername] | Review your own or another player's warnings |
/dwarn <playername> <warning number> | Delete a player's warning |
/cwarns <playername> | Clear a player's warnings |
/fixwarn | Update warnings records from YAML to SQL (0.8.8+) |
Permissions: | |
sw.warn | Users with this permission may issue a warning |
sw.check | Users with this permission may view their own warnings |
sw.check.other | Users with this permission may view other player's warnings |
sw.delete | Users with this permission may clear/delete other player's warnings |
sw.mod | Users with this permission may do all of the above |
sw.reload | Users with this permission may reload the config |
sw.fix | Users with this permission may update outdated warning records |
Quote:Recent ChangeLog:
1.0
- Updated for UUID compatability
0.9.3
- Updated: DefineFinalBanMsg now refers to the message a banned user will see upon attempting to rejoin, if not set they will see their last warning instead
- Updated: Final warning will be shown as kick message and in the final warning broadcast, instead of the final BanMsg
- Fixed: SimpleWarnings no longer interferes with other banned players ban messages, only banned players with the max number of warnings.
0.9.2
- Fixed bug introduced in v0.9.1 - config.yml not generating on first use due to character conflict
0.9.1
- Updated Autoban BanMsg to be displayed when banned player attempts to log in, if BanMsg not defined the final warning is displayed instead.
- Added: Multiple commands for all custom commands & penalties
It would be cool if would be able to use custom ban plugin to tempban palyers, I'm currently usin BanManagegement and this plugin bans player with Perm ban using essentials. This kinda bothers me :)
@Odiumxxx
Cool thanks mate. Just waiting for the download, then I'll update it on my server. Thanks for the quick response, and just as quick update. :)
@baemboo
Very strange, max data-lengths for both the MySQL & SQLite 'placedby' column are set to 16 characters.
Try manually increasing the length value of the placedby column using phpmyadmin or similar.
I'll extend the length in the next update to something like 32 so this is no longer an issue.
@BrotheBear
Have found the issue with SQLite expirations, will upload now.
Hey again.
I think I must be doing something wrong. I set warnings to expire after 7 days, but when someone with a warning re-logs it instantly expires.
I don't get why this is. I've opened up the SQLite database and had a look, and the expiration date is definitely a week after the date issued.
Here is what the database shows.
And the config file.
Cheers. - BB.
had this error when i used /FixWarn update with mysql settings:
[INFO] §7[SimpleWarnings] §cError: §fcom.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'placedby' at row 1
now i set it to sqllite - this worked
A nice feature would be to only allow warnings to be issued to users of a lower group. So, moderators can warn users, but they cannot warn admins, owners or other moderators. Admins could warn users and moderators, but not owners or other admins. Owners could warn users, moderators and admins.
More importantly, warnings could only be removed by a higher group than who placed them. So if a moderator warns a user, only an admin or owner can delete the warning. If an admin warns a user or moderator, only an owner can delete the warning.
This would be especially helpful on servers that have more than one level of admins or moderators, for instance: Player, JuniorModerator, Moderator, JuniorAdmin, Admin, and Owner.
Of course, this assumes that group inheritance has been setup correctly. I'm also assuming there is an API for checking inheritance, so you wouldn't have to re-invent the wheel. And I do realize it would take a bit of work, whether or not there is an API.
And I also like watarimon's suggestion of being able to list users with warnings.
Would be great to have a command for showing a list of warned players. maybe not all warnings but the latest 10 or so.
@Odiumxxx
Ahh. I tried that node earlier, and it didn't seem to work. It seems to be working today though. Must have just been how tired I was.
Thanks mate.
Additionally multiple commands per warning would be cool. :)
@BrotheBear
A) the permission you're looking for is sw.mod
B) Perhaps.
@piercy0812's comment. You say there's a permission node to alert defined groups, other than OP's, to the amount of warnings a user has when they login? I've tried and I can't seem to get it working.
Additionally, would it be possible to get multiple commands per warning? Or at least multiple commands for reaching max warnings.
EG:
Warning1: broadcast %player% has been warned for %reason%, and jailed. Warning1: jail %player% 5m
Or
CustomCommandOnMaxWarning: true CustomCommand: broadcast %player% has been banned for 24 hours due to too many warnings. ; tempban %player% 1d
Cheers. - BB
Could you make this work with MCBANS?
-EDIT: I got this to work by using the run-command on warning feature-
good plugin!
@FluffyTheNeko
That's a hell of an oversight on my part, thanks for the bug report.
Fixed in 0.8.9 :)
Doing /cwarns *user* seems to clear the entire database. Trying to clear one players warnings, but it just results in all of them being removed.
I really like MySQL, and hope this will be fixed.
Thanks for the info regarding my last message.
I am most excited for "Configurable plugin output", the way it currently broadcasts doesn't match the rest of my setup D:
Keep up the good work :)
@piercy0812
That's already a feature.
Hi, a feature i would like to request (it may already be possible but i cannot find it). When you have this config(this is not copied from the config i just typed it manually but you get the idea?): OnJoin: BroadcastWarningTotal: false NotifyUserOfWarningTotal: false NotifyAdminOfUserWarningTotal: true NotifyAdminOfWarningExpire: false
i want to be able to define by permissions who is and admin. So for instance in permissions ill set my Admin and moderator group to be sw.admin (or maybe use sw.mod) then when a user joins all the users with that permissions see the total warnings but normal players or players i dont give the permission to do not see the total.
Thanks, Piercy
@seriosbrad
Aah, very interesting.
It would appear you have 'kickonwarning' set to true.
What's happening is SimpleWarnings is trying to find the player to kick, and seeing as they're offline is unable to do so. thus producing this error.
It's nothing to worry about, but ideally it should check the player is online before trying to kick them, and if they're not simply cancel the kick.
I'm working on the update which includes SQL support and warning expirations now, will fix this in the update.
Thanks for your report. :)
@Alslinet
Considering the limited information given, my best guess would be your YAML formatting. Perhaps a YAML validator can help you to format your config correctly.
My config file refuses to load properly and is then reset to default config. Any tips on what might be worng. This happens if all i do i change a simple true or false value.
Getting this error when warning an offline player:
http://pastebin.com/pVFr9x8w