KarmicJail
KarmicJail
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.
About
This plugin is a fork of imjake9's SimpleJail plugin. It was made because our server needed a new Jail system to replace the defective one that was implemented in the past. While other jail systems were simple and lightweight, they were not nearly as featured as we were used to or wouldn't support our scope. For instance, at the time we had about 190 old entries of jailed players in a MySQL database and we wanted to transfer those over to whatever new system we woud use. Thus, KarmicJail was made, for Mine-RP.
Features
- Simple, single jail system.
- Uses MySQL / SQLite database for storage.
- Look up and page through current jail records.
- Complete history of every jailed player.
- Records each instance a player gets jailed, with all attached info, such as who jailed them, the reason, date, etc.
- Can add custom comments to any player's record.
- Optional permission group modification
- Optional jailed player event / interaction denial
- Persistent jail time. Players need to be online to actually serve their time in jail.
- Quick alias to commands
- Name auto-complete for online players.
- Auto-correct name capitalization for online and offline players, so long as they have visited the server at least once.
- Ex/ Try to jail player "HaXXoR", the following command would work: /j haxxor
- Offline player support.
- Optional inventory management of jailed players.
- Clear the jailed player's inventory so that they don't have access to it in jail.
- View and modify the inventory of a jailed player.
- Return inventory (with modifications if any) to jailed player on release (or not :P).
- Jail multiple people in one command.
- Teleport to the last known location of any player to ever visit the server.
- Warp players to the jail location without "jailing" them.
- Custom jail event for other plugins.
This plugin depends on Vault.
Also requires SQLibrary for SQLite and MySQL.
Commands and Permissions
Configuration
Custom events for plugin developers
TODO:
- ??? - Vote/comment and shape what the future update for the plugin should be.
Maven
This plugin supports Maven. Just add our repository:
<repository> <id>dakani</id> <name>Dakani Nexus Repo</name> <url>http://repo.dakanilabs.com/content/repositories/public</url> </repository>
And add KarmicJail as a dependency:
<dependency> <groupId>com.mitsugaru</groupId> <artifactId>KarmicJail</artifactId> <version>0.443</version> </dependency>
Trello Dev board
Visit the Trello board to see the current todo list for all projects.
You can comment and vote on any of the topics there.
All changes on the Trello board are in real-time.
If this plugin has helped you, please consider donating.
@Mitsugaru
Actually, I am quite impressed with this plugin. It is so much more than SimpleJail, and though I will keep SimpleJail, well, simple, for obvious reasons, this is a wonderful alternative, and much more powerful than SimpleJail will ever be.
Thanks again, and though SimpleJail will always remain SimpleJail, I may implement a few of your strategies into SimpleJail's code. Don't worry, though, I will never try and compete with KarmicJail. Keep it up!
@imjake9
Wow, thanks! That really means a lot XD
I approve.
@Mitsugaru
Then I'll eagerly await you next project :D Great work on this one.
@watarimon
Haha, and now you're getting to the plugin that I've yet to release XD
This is why I have KarmicJail throw a JailEvent: so that other plugins can catch it and read data.
My future plugin allows for staff/mods/admins to create comments/reports on players and view a player's history. A player's report includes kicks, bans, ip changes, and (if you're using KarmicJail) jail events with the reason.
The only reason why I haven't released a rough alpha yet is because I've yet to start on modifying it so that will also report what player usernames have used a given ip address. I have it planned out, but I've just been busy lately with life stuff.
This report plugin was developed so that staff on my server could easily check on what a player has done, see comments from other staff about the player, as well as log their own infraction reports and comments about the player. All of this via in-game commands (because sometimes things aren't logged in the forums...).
Maybe add a logfile option or someway to read jailstats on a player. "watar has been jailed 3 times. Total of 300minutes..." something like that?
A way to keep track of problemplayers...
@Mitsugaru
Moved my comment to a ticket before I read your answer but thanks for the idea, I'll update to 0.27 and set a allowed-cmd flag for now :)
@watarimon
Ok, I see that there's an issue with PermissionBukkit not changing groups. I will try and look into why its not changing groups.
I may or may not have fixed the relog issue in the recent update. Although, it doesn't really fix your primary concern of that they're still in their old groups...
The only thing I can suggest for the time being is to create a worldguard region that contains your jail and set the allowed-cmds flag the the commands you want them to have access to. This should deny them access to all other commands that are not allowed. So long as they're getting warped into the jail properly, this should be a temp fix until I resolve the PermissionsBukkit issue.
[EDIT]
I see the issue for PermissionsBukkit, I'm not allowed to give it a specified world when adding a player to a group.
@Forecaster71
Ah, I was looking at Commander, not the Listener. I'll have a look there then.
@Mitsugaru
It looks like it happens each time a player connects.
When I was setting up and testing the jail the server was almost empty. I set the jail location and tried jailing a player and then un-jail him. It all worked great.
But all of the "Locked" messages start right after a player connects without fault.
@Forecaster71
So, which command is it that throws this error? I'm having trouble finding where the clash is.
[EDIT]
I just ran through all the commands that go through the database and I haven't encountered it yet. So, give more info on when it occurred so we can get this fixed.
@Forecaster71
Sounds like I forgot to close a ResultSet object somewhere. I'll have a look when I can.
I have a problem. Sometimes the plugin claims that the database is locked, even though I've given full access to it. Most of the time it works fine. But when it tries to get into the database it puts a massive load on the server, mostly resulting in it freezing and having to be killed.
It gives me a ton of these: [WARNING] [KarmicJail][SQLite] Locked
then finally this: [SEVERE] [KarmicJail][SQLite] Failed to write to SQLite database. Timed out.
Then the server freezes most of the time. I have 0777 permission set on the KarmicJail folder and I don't know what else could cause it to say this.
@WingedSpear
If there was a time set by the jailer, and if they are given the permission node: KarmicJail.jailstatus, then they are able to check their time via their status using either /jailstatus or /jstatus.
It also tells them how much time remaining when they log on, if they are jailed for a set amount of time.
The ppl in the jail is able to know how much time they will be jailed?
@Mitsugaru
Everything currently works like a charm now - thanks for the quick fix!
I personally dont have any more suggestions, else it would get way too cluttered!
@GmK1
Lol, its fine XD Maybe I shouldn't have set it to the GitHub tracker system...
In any case, I've submitted v0.24. It's added a bunch of null checks when grabbing from the database.
Basically, in the stupid super rare occasion, a jailed player may have some data missing... I've only had this happen once, out of all the players we've jailed. And it was sort of a mistake jail I believe (considering I knew the player well).
Anyways, you'll know if something is missing if it shows info in all caps, such as:
Player was jailed by NOBODY on NO DATE.
For such entries, well, how you handle it is up to you. Let me stress that these are very very rare. More than likely, whatever caused it was beyond the plugin's handling. Perhaps the server was being stopped while it was trying to write to the database. Or the database got locked somehow (Although, typically you'd see that one in the console at least).
@Mitsugaru
Dont hurry!
Also next time I make a ticket and dont spam the comments here, sorry ;)
@GmK1
Hey, can I get a stack trace? I'm not able to replicate the null pointer issue.
[EDIT]
I think I know what is the issue. It would be a quick fix. I just need to finish some things first.
@GmK1
Hey, sorry about that. I'll look into it when I can later today. Super busy with the house.