Commit Graph
15 Commits
Author SHA1 Message Date
Brokkonaut 254c856b2f Update to 1.14pre5 2019-04-24 17:49:52 +02:00
Brokkonaut a4368ea77f Fix sign logging 2018-10-12 22:30:34 +02:00
Brokkonaut 56404533db Improved fire logging and rollback 2018-08-21 06:17:24 +02:00
Brokkonaut a853230c8d I don't like tags 2018-08-03 01:04:38 +02:00
Brokkonaut 92b1a2f394 Improve logging of fallable blocks
Also in this commit: Bukkit's Tags are just broken
2018-08-01 20:01:51 +02:00
Brokkonaut 0a7ea8e747 Treat CAVE_AIR and VOID_AIR the same as AIR 2018-07-29 15:37:28 +02:00
Brokkonaut ce30d33824 Update to 1.13 / Logging/Rollbacks work but largely untested
Still missing: Import data from 1.12 and older
2018-07-29 15:37:28 +02:00
Ammar Askar 9f41fffbc3 Reformat the entire project:
Use of braces is now enforced EVERYWHERE
Switched to 4spaces instead of tabs
2015-03-22 20:15:04 +05:00
Philip Cass 82b4ffc2a2 Support utf8mb4 if the database does. Fixes #535
What MySQL calls "UTF8" is actually a subset of the full unicode specification.
It doesn't accept 4-byte UTF-8 characters.  Proper support is called "utf8mb4"
and is, these days, fairly common (Ubuntu 10.04LTS's bundled MySQL does not
support it, but later ones do)

Detection of utf8mb4: "SHOW CHARACTER SET WHERE charset='utf8mb4';" returns at
least one row

Conversion of pre-existing DBs: this was easy, we already had code in the
updater for this for when we started enforcing utf8. It was version-bumped and
set to update to either utf8mb4 or utf8, depending

Making it use utf8mb4 in the database connection: Actually hard.  Connector/J
5.1.13 or newer should autodetect this, but in my testing it didn't
(http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-13.html)

As such, if utf8mb4 has been detected, I've added code that should manually
execute "SET NAMES utf8mb4;" on all new connections.

If a database does not support utf8mb4 (rare these days) I've added code to
strip these characters before DB insertion; they won't be recorded correctly,
but it'll avoid the exception from issue #535
2015-02-20 22:48:40 +00:00
Philip Cass e3dc430931 Identify players by UUID and migrate existing databases to include this. Fixes #538, fixes #568
This creates a new column in the lb-players table called UUID. If this is in the form of a UUID,
it's assumed to be a player. If not, it's assumed to be a server entity (zombie, sheep, or
WaterFlow, LavaFlow etc.). LogBlock will set the UUID of entities to "log_" plus their name
(i.e. log_zombie or log_sheep)

To assist this is a new class Actor, which wraps a name/UUID pair, with constructors that will
generate one from server entities, or SQL results. Every listener and every class in Consumer
needed to be updated to deal with this

As of yet, only the playername is displayed in results (although the queries do return UUID data).
Similarly, you can only query by name (the database stores the last name they have logged in as).
In addition, the WorldEdit hook has been disabled (is not compiled) since LB needs to be updated
to use their new API, and the LB code hook has to extract UUID information for insertion.

The UUID importer assumes any player with an onlinetime of 0 is a server-generated source, and set
the UUID as above (log_sheep etc.).  For everything else, it sends 100 names at a time to Mojang's
name->UUID service, and records them if available.  If no result is found, it records their UUID as
noimport_theirname.  As this is more likely than other updates to be interrupted mid-way, the
importer is tolerant of e.g. the column already being added, and will resume where it left off.
2015-02-14 14:01:21 +00:00
Dark Arc 3cffeccedb Updated Smart Logging for 1.7.2 and resolved a bug with door logging 2013-12-09 15:32:09 -05:00
Philip Cass eb84fd1380 Various minor improvements to querying and logging
- Allow use of "both" as a query parameter. This will search for created and destroyed blocks, but not chestaccess. This is useful for situations where the query defaults to "all" e.g. rollbacks. Fixes #210, #252
- Add block negation query parameter. Like with player names, you can now precede a block name with "!" to query for all except the specified blocks. Fixes #452, #216
- Allow use of area parameter with location parameter, as long as location is specified first. Fixes #458
- Better error when asking for kill log without world specified
- Don't try to process events where the block is null.  Fixes #463
- Replace problematic characters in world names with underscores when deciding on a default table name.  Fixes #409
- Adjust for cocoa beans having reversed attachment direction in smart logging
- Prevent out of bounds exception if a single-word timespec ends in a number.  Fixes #354
- Prevent error when specifying a killer or victim in a teleport lookup.  Fixes #333
2013-11-12 13:08:52 +00:00
Dark Arc e37a584f89 Fixed door logging 2013-05-19 13:29:16 -04:00
Dark Arc a6f543feac Fixed an issue where smart logging could not make proper block comparison checks 2013-03-15 21:18:12 -04:00
Dark Arc e4ee6f944d [Experimental] Major improvements to LogBlock's accuracy. 2013-01-08 14:39:28 +11:00