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.
This shows every disconnect, not sure it's supposed to or not
@subarct1c
Thank you for testing it and specifying the underlining case where it occurs. For the longest time I thought it had to do with the EventListener side. Found my mistake since you pointed me to where to look for it and now it ought to be fully fixed.
Submitted version 0.36 for approval. As usual, you can find it on GitHub as well if its not readily available here on BukkitDev.
https://github.com/Mitsugaru/KarmicJail/downloads
Now I can focus on moving this toward beta (refactor the annoying main class) and work on other enhancements, such as inventory manipulation.
I've tested the latest version and if the player is online when you jail them the time wont count down when they are offline, but if they are jailed while offline it will start the timer.
@MajorCyto
EDIT: Approved and available on BukkitDev.
Already submitted new version for approval. If you don't want to wait, it is available on GitHub: https://github.com/Mitsugaru/KarmicJail/downloads
Your config.yml will auto-update on enable, with various broadcast options.
@BONNe1704
I'll work on it soon and plan on having it on next release. Maybe tonight or tomorrow. Its funny that you ask for this as I already have a great plugin to pull from for this functionality (KarmicShare), so I'm confident that I can implement what you ask relatively quickly.
@Mitsugaru
it would be nice if you could add both :) Clear inventory adn Restore it :D Thanks :)
@Mitsugaru
Yay thanks i appreciate it, may i ask when the next release is :O
@MajorCyto
Easy enough, I'll put it in next release.
Can you please add 1 config option which broadcasts the player was jailed to the server, and the reason the jailer put. that would be awesome! ^^
@BONNe1704
Sure, do you want the inventory granted back on unjail? Or should that be another config option?
@Mitsugaru maybe you could add clearinventory on jail as a config element :)
@Mitsugaru
I will give it a try tomorrow (too late tonight), and let you know how it works out for us. Thanks again for the quick response!
@subarct1c
Hey, can you test this one: https://github.com/Mitsugaru/KarmicJail/downloads
Also, if you wish, when your config is updated, under the debug section, enable logging to console and events. A jailed player who is being timed should give a success info message that their thread has been removed / stopped.
@subarct1c
Its been a long standing bug. I'll look into it tomorrow as to why their countdown doesn't stop when they log off / DC.
Running v0.355 on 1.2.5-R1.0 seems to work other than the timer is counting down when a player is offline. Is it possible to get an updated version with this bug fixed?
New version, 0.355, being submitted soon.
I have also uploaded it to GitHub if it isn't available on BukkitDev: https://github.com/Mitsugaru/KarmicJail/downloads
@S3thc0n
I have added a config option to not remove the groups when a player is jailed. It will still add the specified group when they are jailed and remove it when unjailed. By default, it is true, so you need to set it to false.
I haven't fully tested this with the new version, but I have edited to potentially have the following ability. Have your plugin grab my plugin and call the method stopTask(name). Where "name" is a string of the player name. If it successfully stopped the task, it will return true. It will return false if it did not have a thread for the given name.
Actually, if you grab the plugin, you could probably do almost anything/everything as much of the methods are public...
@BONNe1704
I chose to add people as they login to the server to help with typos from staff. This way, when the jailer gets the message that a jailed player has never been on the server, they know they typed the username wrong (unless it was a preemptive jail).
As for the negative time, that is weird.... I've added a catch system, so hopefully when they log on it should see the time is negative and unjail them... Honestly confused as to how that happened. Could you export your MySQL database and upload a ticket with the result? I'd like to see the actual entry for the user with negative time.
Can you try the new version and see if the error persists...
It is nice plugin, but with some problems 1. it is write all users in MySQL, even they are not in jail 2. also sometimes time go into -... i dont know who, but plugin did not unjail him, and continue reduce time even when it is negative.
Also a error apers, when jailed person join game :@ it chrash server every time :@
Failed to handle packet: java.lang.IllegalStateException: Failed to add player. net.minecraft.server.EntityPlayer@20cea(Nek1tos_0 at -696.0,6.0,-646.0) already is in chunk -44, -41 java.lang.IllegalStateException: Failed to add player. net.minecraft.server.EntityPlayer@20cea(Nek1tos_0 at -696.0,6.0,-646.0) already is in chunk -44, -41 at net.minecraft.server.PlayerInstance.a(PlayerInstance.java:31) at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:88) at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:146) at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:128) at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:94) at net.minecraft.server.Packet1Login.handle(SourceFile:68) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:48) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:61) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
Could you change two things:
1. Do not chnage their group, but add one.
2. Have an API to let another Plugin set wether the time in jail is counted down or not.
@Mitsugaru
Sorry to say but the problem is still there. If I type "/jail mike 10 Testing jailtime" he's sent to jail and the clock starts ticking no matter if he's online or not.
I type "/jailtime mike 10" and the counter resets at 10 minutes and stays there until he comes online and the time starts counting down.
@watarimon
@watarimon
Try this updated v0.354 here: https://github.com/Mitsugaru/KarmicJail/downloads
I've also submitted the above update to BukkitDev, so it will be available here too eventually.
Less of a problem but /jhelp says same text for /jailtime and /jailmute
Sorry for being a nag :(