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.
np, I'll try it later on tonight.
@watarimon
Is it possible to stick with SQLite, while I try and fix the other issues, until MySQL is non-borked?
Also, can you check the table for me? See if it was created and if the users are in there with the correct status.
@watarimon
::sigh::
I really don't want to believe that the Bukkit API changed SO much that it completely borked this plugin... :/
Its annoying as I haven't had as bad a transition with the other plugins I changed for the new system... or they're just not telling me that those are borked too (hope not).
I promise to work on it this afternoon.
Upgraded to 0.33, changed it to MySQL and now everyone (including mods/admins) spawns in jail everytime. No matter where you are when you disconnect you start in jail on next login.
@subarct1c
Apparently I'm not doing custom events correctly... :\
I'll temporarily remove the custom event (since I highly doubt people are even using it) until I get it to follow the new format correctly.
Also, apparently the changes with Color class, the method I used to colorize text no longer works correctly... A minor thing, but annoying to me nonetheless.
And the jail list doesn't seem to be working either now... and IDEK why <.< I'll try and get that fixed soon. I'm in class at the moment.
As well as auto-unjail not teleporting.... grah! D:
So, the good thing is that the jail command is now working... so the main function of the plugin is back up... but that's about it :\
v0.33 fixes jail command: https://github.com/Mitsugaru/KarmicJail/downloads
@Mitsugaru
Getting this now:
17:41:10 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'jail' in plugin KarmicJail v0.32 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:402) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:784) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:744) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:732) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:101) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:44) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) Caused by: java.lang.IllegalStateException: Event must implement getHandlers() at org.bukkit.event.Event.getHandlers(Event.java:82) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:449) at com.mitsugaru.karmicjail.KarmicJail.jailPlayer(KarmicJail.java:577) at com.mitsugaru.karmicjail.KarmicJail.onCommand(KarmicJail.java:152) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 14 more
17:41:48 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'j' in plugin KarmicJail v0.32 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:402) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:784) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:744) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:732) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:101) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:44) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) Caused by: java.util.IllegalFormatConversionException: x != java.lang.Character at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4011) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2725) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2677) at java.util.Formatter.format(Formatter.java:2449) at java.util.Formatter.format(Formatter.java:2383) at java.lang.String.format(String.java:2781) at com.mitsugaru.karmicjail.KarmicJail.colorizeText(KarmicJail.java:1614) at com.mitsugaru.karmicjail.KarmicJail.jailPlayer(KarmicJail.java:556) at com.mitsugaru.karmicjail.KarmicJail.onCommand(KarmicJail.java:152) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 14 more
@subarct1c
Sorry, that's my fault. Try version 0.32 here: https://github.com/Mitsugaru/KarmicJail/downloads
@Mitsugaru
It loads, but I'm getting this now:
16:39:02 [WARNING] [KarmicJail][SQLite] Error at SQL Query: [SQLITE_ERROR] SQL error or missing database (no such table: jailed) 16:39:02 [SEVERE] Could not pass event org.bukkit.event.player.PlayerChatEvent to KarmicJail org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:453) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:742) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:725) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:101) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100) at lishid.orebfuscator.hook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:44) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024) ... 13 more Caused by: java.lang.NullPointerException at com.mitsugaru.karmicjail.KarmicJail.playerIsJailed(KarmicJail.java:1051) at com.mitsugaru.karmicjail.KarmicJailListener.onPlayerChat(KarmicJailListener.java:35) ... 18 more
@subarct1c
I just found that and I believe I fixed the startup issue with 0.31. I'll be submitting it on BukkitDev, but I'll also post a link on GitHub so that you can test it out immediately. Sorry for the trouble that I've caused. Seems like more than just the event system revamp has been changed.... been out of the loop.
GitHub download link for 0.31: https://github.com/Mitsugaru/KarmicJail/downloads
@watarimon
Try the above jar and see if that fixes the plugin on load/enable issue for you.
@Mitsugaru
I'm also getting the following errors on startup:
2012-02-20 15:32:47 [SEVERE] Index: 0, Size: 0 initializing KarmicJail v0.3 (Is it up to date?) java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:571) at java.util.ArrayList.get(ArrayList.java:349) at com.mitsugaru.karmicjail.Config.<init>(Config.java:28) at com.mitsugaru.karmicjail.KarmicJail.onLoad(KarmicJail.java:75) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:159) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:132) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
2012-02-20 15:32:58 [SEVERE] Error occurred while enabling KarmicJail v0.3 (Is it up to date?): null java.lang.NullPointerException at com.mitsugaru.karmicjail.KarmicJail.onEnable(KarmicJail.java:87) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:231) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:379) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:191) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:174) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
@watarimon
I'll have a look at it later tonight.
Can't load 0.3 on CB 1.1 R4
0.2.9.1 loads but have the offline timer bug.
@Trainis
Well, I was working on a mod/admin commenting system... but I had gotten busy with a different project that I never got around to releasing it here on BukkitDev...
I mean, the comment system alone worked... but it isn't complete enough for me to even warrant calling it an alpha.
In any case, I suppose one could have something monitor chat while a player is jailed, and based off of algorithms or a neural net, decide how "bad" the situation was... IDK :\ Not saying its not cool... rather, something that I don't feel like tackling at the moment. Especially with the lack of time I currently have since its all being sucked up by my senior seminar project.
It would be cool if someone made a program like this that monitored player reactions to your (The griefer in question) and based upon that would auto-kick you from the server. (Three strikes, two kicks then a ban)
Just to let you know, I am working on updating KarmicJail right now. I have it set up to the new Event system. Currently working on quick MySQL support.
KarmicJail v0.3 has been submitted for approval.
@subarct1c
Sorry, not yet D:
I've been busy with my programming project.
@Mitsugaru
Any news on fixing the timer when the player is offline?
@subarct1c
Same problem over here, the countdown keeps ticking no matter if the player is online or not.
@11RJB
Good to hear.
@subarct1c
Actually... that's not supposed to be happening... o.O
I'll try and look into it, but know that I've been rather busy with my Capstone project for college.
Great plugin, works well! I noticed that the time for people jailed still counts down while they are offline. Is there a way to disable this, so that the time only counts down while they are online?