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
k sounds good
@gizmogadget3
I see your point. That being said however, I don't think I'll have time to implement the feature relatively soon. I'll be in the middle of moving this coming week and starting my new position the week after... So, busier than usual.
If someone were to fork the project and make a pull request with said functionality before I can get around to it, then I'd be happy to add it in.
@Mitsugaru
Basic idea is this: currently, lets say op on serverA sees that a player has griefed on serverA if said player is on serverB and the op jails him via serverA then serverB has no way of getting the message ans said player can continue playing until he disconnects, then reconnects.
Im saying to have the mod occasionally re-query/poll the database for status updates, to let op on serverA jail a player and have it kind of echo through the other servers that are using the same database
i think the best approach if you wanted to try to implement my idea would be to have an integer in the config file that goes under the catagory of "mysql:" it would only be effective if "use:" is true (an external db is being used) the integer would be a poll duration, meaning a time in minutes for how often karmicjail should query the database for changes. (0 for never as this is only helpful in the case of multiple servers using the same database) this would require storing the state of each player connected (free/jailed - could be bool) on the interval specified by the int you could run a query similar to: SELECT playername FROM kj_jailed WHERE status='JAILED' then loop through the array of states for each connected player, jailing the ones that are free serverside, where the database says they should be jailed, and freeing the people that are set to be jailed serverside, but not in the results from the query above.
I think this would be a great addition to your mod and i'd be happy to explain further or whatever, thankyou regardless though, for this rather nifty mod :)
@gizmogadget3
Specifically, what changes should it act on? I would think that it should only need to query the database on demand based on each server instance.
@Mitsugaru
it sort of does, would be better if the mod had some sort of timer that would occasionally query the database to see if changes were made and act on those changes, but the two dont interfere with each other
@gizmogadget3
I don't see why it wouldn't. If you do run into issues, let me know.
Will this work properly with 2 servers using the same database?
@Hedgehogs4Me
I've never used SpawnTeleport. However, this plugin has a delay (30 ticks) before teleporting a jailed player on join, so, it will probably override your SpawnTeleport for any players that are jailed.
AFAIK, in theory it shouldn't conflict with the Essential's built-in jail system. In fact, you could use them side by side if you really wanted to. I can't give a definite answer as I don't do any testing with Essentials... ever. The closest I get to "Essentials" is with their Group Manager plugin, which can run without the core Essentials plugin.
That being said, why don't you test it out and see if it functions properly or not? For anything that doesn't work, you could report it and we could possibly work something out.
My server has SpawnTeleport (teleports a player to a location every time they log in). If I get this jail plugin, will jailed users be able to simply relog and escape from jail?
I also have Essentials, which has a built-in jail system, but I want this instead (the Essentials one doesn't even seem to work for some reason). Will it conflict?
@Mitsugaru
Hmm, it looks like setting the home via the bed fixed this bug, for me at least. I don't have anyone right now to test it. As soon as we tested it i will let you know if it worked.
Thanks alot for the fast help! :)
@MRCartm0n
In the debug section of your config, can you set "logToConsole" and "events" both to true. Then, when not jailed and on respawn, can you check the logs and see if it says "Respawned 'NAME' to jail." from my plugin's logger?
@Mitsugaru
Yup, everytime i die, no matter if i'm jailed or not, i keep respawning where i set the jail point.
EDIT: Okay, it seems like when I set the home via the bed it works. Not with the command /sethome though.
@MRCartm0n
Can you expand on that? Are you saying that even while not being jailed you respawn at jail on death?
I have a small problem, when I die i don't respawn at my home (like i set it in essentials) i instead respawn in the jail, where i set the spawn for this plugin
This is a great plugin! The only issue I've run into is allowing block interaction which I've tried to toggle in the config. We're using another plugin that allows players to jump on pressure plates put on sponges and made a jail parkour that jailed players have to escape from to get to the rest of the jail complex. Fun! Anyway, when a player isn't jailed they can interact with the pressure plate/sponge just fine but if they are jailed it doesn't work. I changed the parameter in the config to allow interaction and reset the server but it doesn't seem to work. Is anyone else having an issue with enabling interaction with this plugin?
Best, JAG100
@lilacorn
Its been working for 1.5.1 AFAIK.
I believe the default is that commands are disabled if players are jailed.... so yeah.
does this work well with 1.5.1? and if someone tried to do /spawn or /home or other commands to get them out of jail.... does this prevent them from getting out?
@Melonking
That's not what I meant by aliasing the sub command.
I meants alias /jail to /kj jail, thus it will treat it like the old way. There's no point aliasing jail to the root command kj.
The reason for the root command is to avoid conflicts with other plugins while retaining functionality from both.
Ah thanks!
I have to agree with brewno2k too, the kj seems kinda redundant. Even adding an alias you end up with /jail jail Joe...
@Melonking
Currently, the time parameter only take an integer in minutes. It does not allow for specifiers for other intervals, such as hours / seconds, etc.
So your command would be:
To jail the player Joe (or a player whose name begins with Joe) for 5 minutes with the reason "You're mean.".
If I had the time to switch to using conversations, it would be much simpler and I could allow for time modifiers.