MaxBans
Support Spigot from 1.7.x to 1.12.x
MaxBans is a project I've been writing for my server, MaxGamer. I struggled to find a banning plugin that wasn't a joke, and the good plugins were all designed for Premium servers anyway. Nothing gave us the tools that SHOULD have been out there - Like temp mutes, temp IP bans, duplicate IP lookups, and good autocompletion!
It is thoroughly tested on an Offline-Mode server, so you can bet it's rock solid and feather light!
Databases
- MySQL
- SQLite (Flatfile)
Best Features
Here are the top ten features of MaxBans over other banning plugins:
- Full UUID support
- Ability to view players' previous username(s) - date of change
- Full server lockdown - Prevent anyone from joining with a custom message (Such as bot attacks)
- Offline player name auto completion
- Warnings system
- Duplicate IP detection
- DNSBL lookups to stop proxys!
- Multiline kick messages! No more running off the screen!
- Notifications when a banned player tries to join!
- All times are relative! (Eg. "You're banned for 4 minutes 6 seconds", not "You're banned til 5:43pm CST")
- Customize every colour!
- Block commands like /me when muted!
Commands
- /unban <name, IP or UUID>
- /ban <name, IP or UUID> <reason>
- /ipban <name, IP or UUID> <reason>
- /tempban <name, IP or UUID> <number> <minutes|hours|days|weeks|etc> <reason>
- /tempipban <name, IP or UUID> <number> <minutes|hours|days|weeks|etc> <reason>
- /mute <name or UUID>
- /tempmute <name or UUID> <number> <minutes|hours|days|weeks|etc>
- /kick <name, * for everyone or UUID>
- /checkip <name or UUID>
- /uuid
- /togglechat
- /dupeip <name, IP or UUID>
- /checkban <name, IP or UUID>
- /warn <name or UUID> <reason>
- /clearwarnings <name or UUID> <reason>
- /unwarn <name or UUID> - Removes a players most recent warning
- /unmute <name or UUID>
- /history [name] [number of records] - Displays a history of bans, kicks, mutes & more dealt
- /mbreload - Reloads the plugin
- /mbdebug - Outputs debug information for me if you're having issues!
- /mbwhitelist <name or UUID> - Allows the given user to bypass IP bans (Not regular bans! Eg, use for players with siblings who need to be IP banned)
- /ipreport - Basically, a mass /dupeip, on everyone who is online
- /lockdown [reason]
- /forcespawn - Teleports someone to the spawn (Twice, so /back won't work)
- /mbreload - Reloads maxbans
- /mbimport - Imports vanilla minecraft (And others) bans.
- /mbexport - Export bans to vanilla, MySQL or SQLite databases. (Allows swapping SQLite <-> MySQL), and others ban plugins.
- /rangeban <ip1-ip2> [reason] - Bans the IP range from ip1 to ip2 for the supplied reason.
- /temprangeban <ip1-ip2> <time> <hours/min/sec> [reason] - Temporary variant of above
- /unrangeban <ip> - Removes any RangeBan which overlaps with the given IP. Eg, if 127.0.0.1-127.0.0.5 is banned, unbanning 127.0.0.3 will lift the whole ban on 127.0.0.1-127.0.0.5.
Almost any command may have -s added in it to prevent announcing it, for example:
/tempban NewGuy101 -s 1 hour MaxBans is Awesome!
- Nobody will see the announcement that NewGuy101 was temp banned, just the fact he "has left the game."
If you want an in-depth analysis of each command, try here:
http://dev.bukkit.org/server-mods/maxbans/pages/command-tutorial/
Configuration Guide
http://dev.bukkit.org/server-mods/maxbans/pages/config-tutorial/
This is an in-depth guide on how to configure MaxBans :) If I've missed anything, ask in the comments!
Common Issues
http://dev.bukkit.org/server-mods/maxbans/pages/common-issues/
This is a list of common issues people have with MaxBans, such as plugin conflicts.
Features that will never implement
- Fines (Use your economy to do this!)
- Jails
- Regional bans
- Ban weightings
Ban Listing Webpage
Check out this guy's work for an amazing webpage setup to view MaxBans while using MySQL.
Demo (dont download from here): http://yive.me/maxbans/.
Its updated and is working on latest version of MaxBans!
You can download the updated version from here: https://github.com/FabioZumbi12/maxbans-php
- Added pagination;
- Fixed other ban pages not loading;
Metrics
This plugin uses Hidendra's plugin metrics system (http://mcstats.org/plugin/maxbans) which tracks server information including:
- A unique ID
- Java version
- Online/Offline mode
- Plugin & Server version
- OS name, version, architecture
- Number of CPU cores
- Players online
- Metrics version
These stats can be disabled using the PluginMetrics config file (BukkitServer/plugins/PluginMetrics/config.yml).
GeoIP Lookup
MaxBans will download a GeoIP.csv file, which allows it to look up the country of origin for IP addresses. The file is downloaded directly from maxmind GeopIP site. The file is only downloaded once (Unless it is renamed/removed).
FabioZumbi12:
Hello all. I am other dev and now i assuming the Project for bugfixes and possible improvements.
Netherfoam still busy but still online on comunity. I have a lot of time to code (i have a home work) and i can maintain this plugin (and my others) Always updated ;)
See ya o/




-
View User Profile
-
Send Message
Posted Jan 15, 2014@Prominentc
That's the same error you had last time, where did you download it from? DevBukkit or the Dropbox link I PM'ed you? Because the dropbox link is fixed, the (current) devbukkit link has the bug still.
-
View User Profile
-
Send Message
Posted Jan 15, 2014Got this in the log using the updated latest version:
08:49:26 [INFO] Console muted test for Misconduct
08:49:33 [INFO] Console unmuted test
08:49:47 [WARNING] java.sql.SQLException [SQLITE_ERROR] SQL error or missing database (no such column: reason)
08:49:47 [WARNING] at org.sqlite.DB.newSQLException(DB.java:383)
08:49:47 [WARNING] at org.sqlite.DB.newSQLException(DB.java:387)
08:49:47 [WARNING] at org.sqlite.DB.throwex(DB.java:374)
08:49:47 [WARNING] at org.sqlite.NativeDB.prepare(Native Method)
08:49:47 [WARNING] at org.sqlite.DB.prepare(DB.java:123)
08:49:47 [WARNING] at org.sqlite.PrepStmt.<init>(PrepStmt.java:42)
08:49:47 [WARNING] at org.sqlite.Conn.prepareStatement(Conn.java:404)
08:49:47 [WARNING] at org.sqlite.Conn.prepareStatement(Conn.java:399)
08:49:47 [WARNING] at org.sqlite.Conn.prepareStatement(Conn.java:383)
08:49:47 [WARNING] at org.maxgamer.maxbans.database.BufferStatement.prepareStatement(BufferStatement.java:36)
08:49:47 [WARNING] at org.maxgamer.maxbans.database.SQLiteCore.flush(SQLiteCore.java:91)
08:49:47 [WARNING] at org.maxgamer.maxbans.database.SQLiteCore$1.run(SQLiteCore.java:115)
-
View User Profile
-
Send Message
Posted Jan 14, 2014@chopstick121
When using the synced, only one should have server: true in the configuration.
-
View User Profile
-
Send Message
Posted Jan 14, 2014@netherfoam
im getting this error http://pastebin.com/zF3HQUx9 both have to use different port?
-
View User Profile
-
Send Message
Posted Jan 13, 2014@netherfoam
Thank you.
-
View User Profile
-
Send Message
Posted Jan 13, 2014@Prominentc
I'll PM you a new version in a moment, I think I've found the issue.
-
View User Profile
-
Send Message
Posted Jan 13, 2014MaxBans 2.2 btw I edited the post below.
-
View User Profile
-
Send Message
Posted Jan 13, 2014@Prominentc
What version of MaxBans are you using?
-
View User Profile
-
Send Message
Posted Jan 13, 2014I deleted the Database file and still got that error after CleanChat ran this modified command:
- tempmute <player> 5 minutes Spamming.
Log:
04:09:08 [INFO] [CleanChat] Test was kicked for spamming!
04:09:10 [INFO] Test[/127.0.0.1:6283] logged in with entity id 256 at ([World] -2583.50501663873, 145.6, -5302.402632619335)
04:09:13 [INFO] Console temp muted Test for Spamming for 5 minutes.
04:09:13 [INFO] [CleanChat] Test was muted for spamming!
04:09:34 [WARNING] java.sql.SQLException [SQLITE_CONSTRAINT] Abort due to constraint violation (mutes.reason may not be NULL)
04:09:34 [WARNING] at org.sqlite.DB.newSQLException(DB.java:383)
04:09:34 [WARNING] at org.sqlite.DB.newSQLException(DB.java:387)
04:09:34 [WARNING] at org.sqlite.DB.execute(DB.java:342)
04:09:34 [WARNING] at org.sqlite.PrepStmt.execute(PrepStmt.java:65)
04:09:34 [WARNING] at org.maxgamer.maxbans.database.SQLiteCore.flush(SQLiteCore.java:92)
04:09:34 [WARNING] at org.maxgamer.maxbans.database.SQLiteCore$1.run(SQLiteCore.java:115)
I think it happens when the muted player tries to chat when muted. I also downloaded version MaxBans 2.2 and deleted the maxbans folder so everything is default and new and the same error occurs :/
-
View User Profile
-
Send Message
Posted Jan 13, 2014@Prominentc
So, due to a bug a few versions back, there are a few solutions in order of complexity:
Option #1: Delete your bans.db file in the plugins\MaxBans folder while the server is offline (Removes all bans)
Option #2: Edit the bans.db file in plugins\MaxBans with a database editor, and remove the mutes table (Removes all mutes)
Option #3: Edit the mutes table in plugins\MaxBans with a database editor, and remove the NOT NULL constraint on the reason column. (All data preserved)
-
View User Profile
-
Send Message
Posted Jan 13, 201417:27:13 [WARNING] java.sql.SQLException [SQLITE_CONSTRAINT] Abort due to constraint violation (mutes.reason may not be NULL)
17:27:13 [WARNING] at org.sqlite.DB.newSQLException(DB.java:383)
17:27:13 [WARNING] at org.sqlite.DB.newSQLException(DB.java:387)
17:27:13 [WARNING] at org.sqlite.DB.execute(DB.java:342)
17:27:13 [WARNING] at org.sqlite.PrepStmt.execute(PrepStmt.java:65)
17:27:13 [WARNING] at org.maxgamer.maxbans.database.SQLiteCore.flush(SQLiteCore.java:92)
17:27:13 [WARNING] at org.maxgamer.maxbans.database.SQLiteCore$1.run(SQLiteCore.java:115)
When cleanchat runs command: - mute <player> 5m1s &cYou were muted for spamming. Spamming can lead to a ban!
-
View User Profile
-
Send Message
Posted Jan 12, 2014@Chalkie19
Confirmed, my servers weren't syncing properly until I fixed the paste error and updated the version across all servers. The bugs were actually related, and I had to restart the SyncServer first, and then the syncers after that. That fixed it (Also, updating a Syncer, restarting the syncer, updating the SyncServer, restarting the syncServer, and then reloading the Syncer [This is what you did] will work too)
So I'm going to take this as fixed then. :)
-
View User Profile
-
Send Message
Posted Jan 11, 2014@Chalkie19
So I've had a look, and snooped out everything checks whether debugging is enabled. I can't find any circumstance that'd cause it to stop syncing, was it possibly just the reloading that fixed it?
-
View User Profile
-
Send Message
Posted Jan 10, 2014@Chalkie19
Hmmm, strange. I will have a look into it later during the weekend when I have some more free time, thanks for the info though, it helps nail these kinds of things!
-
View User Profile
-
Send Message
Posted Jan 10, 2014@netherfoam
Sure Ill enable it now to stop that. Never really had a problem with weird names so I had no reason to enable it.
Version is updated, they are all running 2.3, only 2.2 on here :D
I did ban the player on the sync server then did a check ban on the syncers and there was no change, I also did the opposite (unbanned a player on the syncer) and they were still banned on the sync.
Always happy to, banning system is an integral part of our server. let me know if there is anyway I can help :)
Edit: So I decided to turn debug mode on my factions server (syncer) and did a /mbreload and now it's syncing -_- I don't even...
-
View User Profile
-
Send Message
Posted Jan 9, 2014@Chalkie19
Well I'm not really sure how to handle special characters like that (When it comes to MySQL and SQLite charsets and compatability), but would it cause you grief to enable name filtering? It makes sure names are A-Z, a-z, 0-9 or _ and aren't empty strings (Basically, Minecraft.net standards for offline servers) and if names contain those, it simply kicks them when joining.
As for the banning/syncers, I'm not sure what's going wrong - That debug info looks as if it's all running smoothly with one exception, the 'kick request' isn't supplying a name. Possibly try updating the version and see what happens?
I'm guessing that it's banning the player, but not successfully kicking them. To test it, give the ban, then do a /checkban on another server on the same player, or try to relog the player?
And cheers for the donation! It's really appreciated, we haven't had a lot lately on the server so thanks again (:
-
View User Profile
-
Send Message
Posted Jan 9, 2014@netherfoam
I have to keep you on your toes!
Yea, the person whom was trying to join had a crazy 1/l in their name, I assumed that was the reason but put forward the issue anyway (just in case). Filter is set to false (filter-names).
Banning and banning the player. http://pastebin.com/Rg1ADWZ8 (Did not ban the player on the Syncers.
Here is the pastebin of the start up of MB with debug on along with the version I am using (Spigot (removed the password ofc)) http://pastebin.com/Jx0Qj9gY .
Let me know if there is anymore info you need :D Enjoy the donation.
-
View User Profile
-
Send Message
Posted Jan 9, 2014@Chalkie19
Ahh, you never cease to bring me the strangest of riddles.
Okay, so, the first issue - Syncing & the error message. The error message looks like it's from a strange name (Do you have filter-names: true in your config's? Possibly someone playing with a username that starts with Ä if you don't?)
The syncing is a bit strange, can I suggest setting sync.debug: true in your config (Of your SyncServer, the Syncers won't be as helpful), and seeing what debug messages it gives you - It should show a fair bit of debug info (Eg every time a player joins)... Can you send me a sample of what it says on the SyncServer when
As for MBPaste, will check it out... Sounds like pastebin.com went down or something, but that's unheard of?
EDIT: Scratch the MBPaste idea, my bad. Wouldn't recommend using it, great way to cause a memory leak :) Fixed it in future versions.
-
View User Profile
-
Send Message
Posted Jan 9, 2014Hey Nether,
My servers have stopped syncing again, it only seems to have started since we updated to 1.7.2 and may possibly have to do with this error. http://pastebin.com/VnTTYP1c No errors seem to be coming up on either the sync server console or the read only servers and the mbpaste command is not working (do the command in game then about 10 seconds later get an internal error http://pastebin.com/VhKXmR0i) During this 10-15 seconds it kills the server, as in no commands it grinds to a halt and other plugins start freaking out, here is a timings of me using the command. http://aikar.co/timings.php?url=6720931 (Dropped the server from 20tps to 7tps over 30 seconds, 2k pct for playerCommand @_@)
As per usual thanks for your time.
-
View User Profile
-
Send Message
Posted Jan 3, 2014imm getting this error http://pastebin.com/M0nGrFqT