Commit Graph

77 Commits

Author SHA1 Message Date
45a0c79bdd Fix inventory not being stored in chests of a cell 2015-06-12 23:09:08 -05:00
4c7166251f Add isJailedForever to the prisoner & use it in pay 2015-06-10 16:05:24 -05:00
384fa3601b New command for signs, closes #79
A new command for signs. Refreshing them, cleaning them, and verifying
them. Changed up some internal apis, if you were using them sorry for
breaking it. Also, really update the signs when we jail someone who is
offline via a new event.
2015-06-05 18:01:31 -05:00
68e35ed271 New method to see if a jail has an empty cell 2015-06-03 11:33:37 -05:00
afa051b1b2 Move Data After Storage Changed, Closes #75
After someone reloads the plugin and they've switched the storage system
then put the data, if any exists, into the new storage system. This
means a player can go from flatfile to mysql or from mysql to flatfile
without having to do any manual work.
2015-05-27 12:26:31 -05:00
12f35a01bf Don't resave cells on stopping creation, fixes #74
We was saving everything again when the players stop creating anything,
this was causing issues with duplicate cells when using any storage with
SQL (due to insert and no primary key).

Also, added a hasChanged to the cell class which will prevent resaving
things in sql if it hasn't changed.
2015-05-26 14:57:38 -05:00
3eedc4904f [BREAKING] Change up cell selection.
In the PrisonerManager you can now provide either AnyCell or NoCell and
it'll select a cell or not based upon the provided one. This is breaking
because it changes the required types in the methods and the new cells
don't have anything implemented and throw exceptions.
2015-05-22 15:41:54 -05:00
1f9035646d Allow easier Prisoner creations.
All a whole variety of prisoner class creation, making API usage very
nice and easy.
2015-05-22 11:07:08 -05:00
2dfa34c05c Don't add/subtract time when they're jailed forever
This fixes an issue brought up in #69
2015-05-21 15:03:46 -05:00
41717678c5 Git shows these files as changed
I assume this is due to line endings not being the same across all files
due to them being created on different operating systems.
2015-05-07 11:27:18 -05:00
0d9ed022f3 Only try to jail in a cell if that jail has cells, resolves #51 2015-02-16 15:00:14 -06:00
d205a35d0a Add the Jail Vote feature back in, with lots of unit testing. Closes #8 2015-02-12 21:29:09 -06:00
b23bdaa89b Sign updates are done via the event listeners. 2015-02-10 12:16:45 -06:00
0cb6d7ca84 Don't get a location from a null value, fixes #46 2015-02-09 23:38:30 -06:00
ad57ed767b Use our simple location object when loading a jail, finally resolves #41 2015-01-27 18:08:44 -06:00
6ddabe39ad Fix the failing tests. 2014-08-19 14:43:03 -05:00
81da8ddb59 First attempt at getting the signs of cells to display information #31
The variables possible are:
* %player% - the player's last known name
* %uuid% - the player's uuid, or what can fit on a sign
* %reason% - the reason the player was jailed
* %jailer% - the person/thing who jailed this player
* %afktime% - the amount of time the player has been afk
* %timeinminutes% - the amount of remaining time the player has in
minutes

If the player is jailed forever, then it pulls from the language file
`jailedforeversign` property.
2014-08-19 14:19:30 -05:00
71a60e6ee3 Fix the spacing and clean it up. 2014-07-27 14:46:25 -05:00
a2d46b8e26 Forgot part of the JavaDoc, whoops. 2014-07-21 18:28:56 -05:00
8b547ed748 Add more jail stick JavaDoc and fix the OBE from previous version of
jail sticks being used.
2014-07-21 18:27:40 -05:00
d034a0f1ed Fix the error when trying to measure difference between two worlds. 2014-07-15 00:19:13 -05:00
86082e2f63 Allow resisting arrests via the jail stick. 2014-07-15 00:11:36 -05:00
a5bf89b07e Don't allow jailing in unloaded worlds and don't allow joining while
jailed in unloaded worlds.
2014-07-14 22:53:48 -05:00
5c4122ee92 Fix the unjailing not working, was messed up when we switch to UUIDs 2014-07-14 21:55:01 -05:00
3912dbfabc Only save the prisoners if they were changed, add that flag. 2014-07-14 18:23:29 -05:00
c7de4364b1 If the world is null, don't return a string of the location. 2014-07-14 17:09:06 -05:00
d535b758d4 Add .gitattributes 2014-06-12 10:50:53 -05:00
a442887b36 Telling me something changed but I don't know what. Will revert if it is
something breaking.
2014-06-12 10:15:11 -05:00
7ad5fedfd1 Work on the tests and change up some performance issues.
1. In the player move event we looped through the jailed players more
than once which really is an issue when you have several hundred jailed
and since the move event is called several times a second, that was a
huge performance hit.
2. Don't save the prisoner data as soon as they are jailed, we take care
of that else where with the shutting down and counting down time.
2014-05-30 15:54:11 -05:00
45bd4ac8c1 Reference the plugin and not Bukkit 2014-05-30 14:28:04 -05:00
af1fa37470 Add a cache for prisoners online only, this should help performance #26
The cache listens to a lot of events and custom events to ensure the
cache is up to date, this way we don't have to loop through all the
prisoners in a jail every single time they move or something but instead
just check the cache.
2014-05-30 12:23:32 -05:00
3e54d79dd3 Try to lower the amount of time spent on each move event as mentioned in
issue #26
2014-05-08 19:30:20 -05:00
4d4f609b82 Finish using the UUID, we are still using blocking methods.
I want to get fully away from blocking methods and instead make the
user/player/prisoner/whatever wait to get an answer while we retrieve
the uuid information asynchronously.
2014-04-29 13:20:33 -05:00
ad9c70cbbf Readd the method I removed and also change the cells to uuid. 2014-04-29 10:53:36 -05:00
63e117ac72 Build will fail. Started work on converting to using uuid's internally.
While doing this I deleted one method that I shouldn't have, so going to
revert that. Next I have to build a method or two which will allow me to
do last known names lookups, etc. Might switch to using a library to
handle getting names async so we don't block the server up, doing this
will result in us having to recode some of the commands internally.

If you have any suggestions or questions, I'm open.
2014-04-28 23:52:52 -05:00
a3d9a54ff0 First attempt to use UUID, not tested one ounce.
And I imagine the unit tests are going to fail.
2014-04-21 22:58:15 -05:00
fe7cb9f5a5 Add a new command /jail time which has easy access for add/subtract
time from a prisoner's sentence.

This command could be useful for commandblocks or something else, as it
does not need a player context. This closes Bukkit Dev Ticket:
http://dev.bukkit.org/bukkit-plugins/jail/tickets/432/
2014-03-15 14:40:50 -05:00
3e3f2d432e Convert the old data to our new data and move the old files.
Closes #24 but it probably has a few bugs or prisoners who were in cells
are not any more, but I will only fix that if someone pursades me to.
2014-03-14 17:40:44 -05:00
2778c79150 Debugging to figure out why more than one stick isn't being loaded. 2014-03-14 15:44:19 -05:00
ec1e91cda2 Implement the usage of Scoreboards, make the language configurable.
Closes #15
2014-03-13 12:59:47 -05:00
39cc95b96d The jail stick is now usable.
Closes #16.
2014-03-08 23:39:11 -06:00
df45b267a7 Okay okay, add the missing files for the Jail Stick for #16. 2014-03-08 22:53:59 -06:00
262f1dc4f9 Finish loading cells and check for chest when we are removing a cell. 2014-03-05 22:28:12 -06:00
3a6a76a86c Try a different way of seeing if a block is a sign on removing of a cell 2014-03-05 22:15:22 -06:00
0fabe1ff2e Add some sql to remove the cells and jails.
Untested.
2014-03-05 16:56:13 -06:00
95e9c7c50a Reorganize how we save new cells, this way doesn't dupe cells any more. 2014-02-21 09:32:11 -06:00
d2a6773522 Fix the generation of the sign strings. 2014-02-21 09:23:50 -06:00
75aec51dc2 Let's try to save the jails with MySQL, first attempt #18. 2014-02-20 20:55:04 -06:00
3784eb6b28 Fix the confirm not working. 2014-02-14 23:18:41 -06:00
f6686fee8d Start work on #3, confirming before deleting something major. 2014-02-13 13:02:44 -06:00