Jail This plugins adds Jail to your minecraft server. Admins can define several jails and then jail/unjail people or jail them on time basis. Plugin also offers wide variety of protections, so players won't escape out of your jail. See BukkitDev page for more information and download links: http://dev.bukkit.org/server-mods/jail/ (you can use your minecraft forum username and password on BukkitDev)
Yay! Thank you soo much for releasing this. My server uses a jail, as I like to create towns and make them as real as possible, and also not have to kick/ban players, just throw them in jail.
AWESOME....hey an idea...Timer per player jailed...so you can jail them and when time runs out they teleport to spawn
hi there, could u please share the SQL file? i gott some errors with table cration: Code: 2011-01-24 23:47:28 [SEVERE] [Jail]: Create Table SQL Exception mysql com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"jail_prisoners" ("PlayerName" VARCHAR PRIMARY KEY NOT NULL , "RemainTime" INTE' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1564) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1485) at com.matejdro.bukkit.jail.InputOutput.PrepareDB(InputOutput.java:303) at com.matejdro.bukkit.jail.Jail.onEnable(Jail.java:56) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:282) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:173) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:60) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:45) at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:153) at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:140) at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:104) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:177) at net.minecraft.server.ThreadServerApplication.run(SourceFile:512) 2011-01-24 23:47:28 [SEVERE] [Jail] Error while loading Jail zones! 2011-01-24 23:47:28 [SEVERE] [Jail] Error while loading prisoners from the database! Server: Linux Debian 5.0 MySQL version: 5.0.51a-24+lenny4
Ah, sorry, I didn't had much chance try the mysql part. Here are the queries for the table creation: Code: CREATE TABLE IF NOT EXISTS "jail_zones" ("name" VARCHAR PRIMARY KEY NOT NULL , "X1" DOUBLE, "Y1" DOUBLE, "Z1" DOUBLE, "X2" DOUBLE, "Y2" DOUBLE, "Z2" DOUBLE, "teleX" DOUBLE, "teleY" DOUBLE, "teleZ" DOUBLE, "freeX" DOUBLE, "freeY" DOUBLE, "FreeZ" DOUBLE); CREATE TABLE IF NOT EXISTS "jail_prisoners" ("PlayerName" VARCHAR PRIMARY KEY NOT NULL , "RemainTime" INTEGER, "JailName" STRING, "Offline" BOOLEAN, "TransferDest" STRING); I will check mysql and release fixed version tomorrow, but if you are in rush, you can convert these queries to mysql and use Jail version in the attachment which have DB creation disabled.
there are no rush, thank you for files, but anyway - it seems to not work as planned.. I created MySQL querys: Code: CREATE TABLE `jail_prisoners` ( `PlayerName` varchar(250) NOT NULL, `RemainTime` int(11) DEFAULT NULL, `JailName` varchar(250) DEFAULT NULL, `Offline` varchar(250) DEFAULT NULL, `TransferDest` varchar(250) DEFAULT NULL, PRIMARY KEY (`PlayerName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Code: CREATE TABLE `jail_zones` ( `name` varchar(250) NOT NULL DEFAULT '', `X1` double DEFAULT NULL, `Y1` double DEFAULT NULL, `Z1` double DEFAULT NULL, `X2` double DEFAULT NULL, `Y2` double DEFAULT NULL, `Z2` double DEFAULT NULL, `teleX` double DEFAULT NULL, `teleY` double DEFAULT NULL, `teleZ` double DEFAULT NULL, `freeX` double DEFAULT NULL, `freeY` double DEFAULT NULL, `FreeZ` double DEFAULT NULL, PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; but server console went mad and started to flood this error - i updated my craftbukkit and this bug despaired And all players lost their items from inventorys. sorry, its a Authorize plugin bug
Needed this plugin for my server, thanks . Could you also add some sort of command so that the player in jail and/or everyone else on the server can check how long the player has left for jail time? No rush or anything, just a request. Thanks in advance.
Updated. Can anyone please explain me how to get this thread into Plugin Releases forums? It appears i can't change title until then and lots of new plugins are already there, so it's possible. Mods, at least change title of the thread to v 0.2 please. EDIT: nevermind, i have figured out whole renaming thing. But still, how to get into releases forum?
i remmember that in hey0 when u jailed some 1 they could still /spawn out and walk around can they do that in this still?
Nope. There is even double protection. 1. /spawn command simply won't work (and they will get penalty for trying to use it, unless you disable it) 2. If they manage to get out of jail, they will be instantly ported back to jail.
A couple questions. 1) Can you add the option to allow jailbreaks? It adds to the RP element. 2) Can you disable pvp or damage within the jail cuboid? 3) (this will be the hardest, probably) can you set it so that certain groups can ONLY jail members of their groups and/or the default group? For instance, There is a clan that get their own group, and their leader is ranked as an op. Can you make it so that he (the only member of the clan with the jail permission) can only jail members of his own clan, and possibly also default users who are not a member of another group? Is it also possible to limit that leader to only jailing to a specific jail? I realize that's a lot, but those capabilities would be astounding! Thanks!
1. You can toggle protections in the configuration file. 2. Not yet. Good idea, i will add it. 3. Sounds fun. I will see what can i do.
great plugin, would you mind adding a command to list all of my current Jail's? --- merged: Jan 26, 2011 4:51 PM --- also a way for admin to list all players in jail and the time they have left
This plugin broke my other plugins so badly that I had to immediately stop using it after I started using it :\
@ZeroDPS both commands added to my to-do list. @Lookatmego I will see what can i do @M1sT3rM4n can you be more specific please? What plugins did it broke? Were there any error messages? Please give me more information.
great plugin, would you mind adding a command to list all of my current Jail's? --- merged: Today at 11:51 AM --- also a way for admin to list all players in jail and the time they have left I SECOND THAT IDEA! the jail list would be amazing
Hi, Thanks for your plugin, working great. Tested almost every feature, all worked flawlessly. Maybe due to lag, and my configration (+10 minutes for using commands, + 30 for escaping jail), players who try /spawn get +10 for command and +30 for the small second outside Also, it seems that players'names are CaSe SenSitive. Don't really bothering me, as I have a small server, but for big ones... And, finally, I get a warning, but It doesn't seems to break the plugin or anything, so... Here is the message : Code: 27 janv. 2011 02:42:11 org.bukkit.plugin.SimplePluginManager callEvent GRAVE: Could not pass event PLAYER_ITEM to Jail java.lang.NullPointerException at com.matejdro.bukkit.jail.JailPlayer.onPlayerItem(JailPlayer.java:354) at org.bukkit.plugin.java.JavaPluginLoader.callEvent(JavaPluginLoader.java:147) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:201) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:423) at net.minecraft.server.Packet15Place.a(SourceFile:57) at net.minecraft.server.NetworkManager.a(SourceFile:232) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65) at net.minecraft.server.NetworkListenThread.a(SourceFile:104) at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197) at net.minecraft.server.ThreadServerApplication.run(SourceFile:512) If this can help But your plugin works already perfectly well, thanks for it !
Yeah, got that same error on CraftBukkit #141.. I'm on Linux Ubuntu 10.10, if that changes something. But the problem is that, sometimes the plugin get confused... sometimes I put someone to Jail, then It says that the player was sent to Jail but also says that the player is already in Jail... something similar happens when I try to unjail someone, maybe because of the case sensitive names, idk. Anyway, thanks for the plugin.
I'm also getting a similar error using 141. I also noticed it lets them use /home or /spawn when its set to be disabled, but quickly ports them back. Would it be possible to prevent it happening at all so it doesn't even port them out?
plugin works perfectly on cbukkit 137 love it! One request tho: make them unable to use public chat, allowing only /msg to admins. Edit: another request: In the event that they do die/respawn, make it so that jailed players respawn inside jail.
@anyone with error: what did you had in your hand? If you had bare hands, does switching to anything else fixes it? @subarct1c @ToitagL what plugin do you use for /home and /spawn? Usually this happens due to bad priority in those plugins. But it may be my fault too, i will check it. @highwisdom when they respawn, they are instantly ported to jail. I doubt i can change spawn location for specific players otherwise. So suggestions: case insensitive names, prevent public chat. Anything i missed? Thanks for your feedback. P.S.: wow, my plugin landed in Plugin Releases. Thanks, moderators!
I use Mywarp and Myhome. And for the error, I dunno, It happens with some of my players, sometimes nothing for minutes, then the error every second, so yes, I suppose it's due to something with hands...
Well, the error happens when it wants to happen, idk, but when I saw the error, tried to switch items to my hand, but I still got the errors, and, even when i'm not with bare hands the error shows up. The only problem this error is giving me Is that, when it happens and I try to Jail someone, it says that the player is already in jail, but when I try again It works, but give me 2 contradictories messages, saying that the player was sent to jail, and that he is already jailed.
Oh, new error today... SQL related. And after reboot, jails created were gone : Code: 2011-01-27 16:59:57 [SEVERE] [Jail] Error while updating Prisoner into DB! java.sql.SQLException: SQL logic error or missing database at org.sqlite.DB.throwex(DB.java:288) at org.sqlite.DB.exec(DB.java:68) at org.sqlite.Conn.commit(Conn.java:172) at com.matejdro.bukkit.jail.InputOutput.UpdatePrisoners(InputOutput.java:295) at com.matejdro.bukkit.jail.Jail$1.actionPerformed(Jail.java:273) at javax.swing.Timer.fireActionPerformed(Timer.java:271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Does anybody else have double message problem like koda have? As for SQL error, it appears as sqlite problem to me. It looks like your database was somehow deleted. Such action is not in my Plugin, so it's probably not my fault. Delete sqlite file from plugins\Jail folder and try again.