Commit Graph

84 Commits

Author SHA1 Message Date
asofold
a00b6a53b5 Fix issues with respawning ender dragons (block place reqach+distance). 2016-03-26 02:42:35 +01:00
asofold
81b0c9441a Log just used workarounds on debug. 2016-03-26 01:01:44 +01:00
asofold
752e130640 Adjustments for elytra and creativefly default model configs.
* Allow moderate ascending with elytra.
* Let ground be true by default.
* Disable some stuff for spectator mode by default.
* Alter logging.
2016-03-26 00:19:20 +01:00
asofold
10cf788acd Duplicate javadocs. 2016-03-18 14:31:47 +01:00
asofold
c22126449b [BLEEDING] Dedicated MCAccess for 1.9.
This won't cover all effects of internal changes, some blocks might be
interpreted wrongly still, some shapes may have changed in an
incompatible way (e.g. skulls).
2016-03-03 20:11:46 +01:00
asofold
5d72a51001 Fix hash code use. 2016-02-08 01:35:24 +01:00
asofold
6c977edacf Sketch out another storage map (not yet in use). 2016-01-28 22:51:41 +01:00
asofold
02137600b7 [BLEEDING] Make use of workarounds for a specific case, test-wise. 2016-01-18 00:40:51 +01:00
asofold
228ed2f74a Add tests for WorkaroundSet. Related fixes/changes. 2016-01-17 23:37:30 +01:00
asofold
aacb97b26b Add tests for SimpleWorkaroundRegistry. Related fixes. 2016-01-17 21:52:40 +01:00
asofold
db462091d0 Add tests for workarounds. 2016-01-17 18:49:07 +01:00
asofold
8a70ad939b Rename interface to I... 2016-01-17 17:50:51 +01:00
asofold
f0dd67590d Don't override use in WorkaroundCountDown. Adjust java docs. 2016-01-17 16:36:03 +01:00
asofold
d2b151af99 Second iteration on the workaround infrastructure (not in use).
* Rename interfaces to I...
* Split off the statistics counting to accept/deny counters.
* Remove support for parent workarounds.
* Do use a testUse method for overriding in AbstractWorkaround.
* Add a stage counter to WorkaroundCountDown, for meta checks per stage.
* Extend/alter/implement default method signatures and interfaces.

Missing:
* Tests for the workaround package.
* Add a primary thread / moving checks registry instance.
* Add default sets and use in moving checks (primary thread only).
2016-01-17 16:27:57 +01:00
asofold
f337538ce3 A blueprint. 2016-01-17 02:31:14 +01:00
asofold
567ef1b971 Rough sketch of workaround confinement and statistics support.
Untested, unused. Intentions are:
* Be able to count any use of workarounds.
* Confine workarounds to side conditions, such as 'use once until
conditions are reset' and/or 'only use once conditions are set'.
* Have per-player objects and (attached) global counters.
* (Might think of: disable workarounds by configuration.)
2016-01-17 02:12:00 +01:00
asofold
a216a940d6 Fixes and tests for LinkedCoordHashMap.
* Default order: order of first put (first put is first on iteration).
* Fix order being done right for all cases.
* Fix linking.
* Override clear.
* Add more tests.
2015-11-30 10:12:44 +01:00
asofold
64b4f30696 Set scope to provided for external jars. 2015-11-25 08:47:11 +01:00
asofold
218fdc46c4 [BREAKING] Move ActionFrequency and ActionAccumulator to a sub-package. 2015-11-24 07:33:30 +01:00
asofold
5fe02d75d2 Random: Add join for an array. 2015-11-15 05:32:00 +01:00
asofold
af5fbd900a Move prefixes to loggers. 2015-11-15 02:44:01 +01:00
asofold
4d59f67d34 Switch the default asynchronous CallContext to ASYNCHRONOUS_TASK.
This will preserve the order of debug messages sent from multiple
threads. As a side effect, this might be better for performance, given
that on constant input the logging task will stay registered, so there
is little overhead and the file-io is taken off the asynchronous packet
and chat handler threads.Hopefully the thread switching is less
expensive than the gain by not delaying chat/packet threads, in case of
servers with few cores. We might adapt the used policy later, based on
cores and/or config.
2015-10-18 18:31:52 +02:00
asofold
f0c6ab69b5 Don't call move, if there is no entry. 2015-09-28 15:16:54 +02:00
asofold
08c5aa2d7c Implement a linked coord hash map, custom order, tests.
Can't implement "dumb" access order, because we will have to move
entries to the front with setting and altering data, but we don't want
the data to be changed every time get is called, e.g. with piston
tracking.

Efficiency could be increased, using the entry as reference instead of
duplicate calls with coordinates.
2015-09-28 15:10:02 +02:00
asofold
f70151d8c7 Use an iterator for remove. 2015-09-28 13:09:45 +02:00
asofold
9efcf01766 [BREAKING] Move maps into a maps package. Prepare a linked CoordMap.
Splits CoordMap into interface, abstract hash map, implementations.
Sketch Linked version, hinting at access order, e.g. with
tracking piston effects with timeouts.

Missing:
* Implementation of a linked version.
2015-09-28 12:56:58 +02:00
asofold
866a2248cf Use tabs for all the pom.xml. 2015-08-01 00:58:33 +02:00
asofold
7da874ad66 Attempt to deploy only the final plugin jar. 2015-07-30 11:27:30 +02:00
asofold
2f50cca03d [BLEEDING] Fixes and additions for the compatibility layer.
* Make attribute methods consistent (remove the sprint boost modifier
from the generic speed multiplier, because it's inconsistent).
* Add missing implementations.
* Adjust default sprinting speed modifier.
* Add more guards for the latest compat module (1.8_R3).
* Add a reflection based compat module for CB, to cover minor updates.
* Possibly other minor fixes/changes.

[Hail "insufficient data written"!]
2015-06-06 16:14:36 +02:00
asofold
de3b95de5d More on ActionFrequency.
* lastUpdate is always set calling update().
* Negative diff can not affect update (time ran backwards).
* Use lastUpdate instead of lastAccess where appropriate.
* More comments/formatting.
2015-02-09 18:02:24 +01:00
asofold
75cc31e786 Clarifications for ActionFrequency. 2015-02-09 17:08:55 +01:00
asofold
e0a8ef21d6 Revert module dependency versions to 1.1-SNAPSHOT.
(LATEST would use the old static ones.)
2015-02-06 02:05:48 +01:00
asofold
a7127336a8 Use LATEST as version for internal dependencies. 2015-02-04 23:42:05 +01:00
asofold
2cecd50961 Change all "static" pom versions to "1.1-SNAPSHOT", to allow deploy. 2015-02-04 18:49:52 +01:00
asofold
bd5794d0bd Spaces. 2015-01-05 22:07:04 +01:00
asofold
c00347c894 More test coverage. 2014-12-20 16:27:27 +01:00
asofold
fb6ac2ad5a [BLEEDING] Prevent noclip using commands with untracked moves.
A cheat client could move such that they are inside of a block, but
CraftBukkit will not fire an event, because the distance and looking
direction don't change enough. Teleporting other players or yourself to
that location would result in getting someone into a block. Consequently
 we also have to block commands like /sethome at such locations.

Our first attempt to patch that will monitor teleports that use the
TeleportCause.COMMAND (might miss out on plugins that are not using the
appropriate cause, and on plugins that use items for teleportation), in
addition we monitor certain commands (configurable prefixes), to catch
things like "sethome" and "sethome2". The world spawn is exempted. Only
teleports into blocks are monitored.

This does not yet sanity-check the distance to the last tracked
location, but it will ignore if none is set.
2014-12-17 20:16:28 +01:00
asofold
ea5b249197 Alter how command lists are interpreted. Might fix some issues.
Details:
* Only trim commands from the left side (both on feed and check).
* Ensure versions with and without leading '/' are fed into trees.
* Move methods to feed CharPrefixTree from configs to CommandUtil.

Potentially fixes (untested):
* Only deny the sub-commands for a prefix, example: feed 'version ' to
consoleonly, in order to allow 'version' but not 'version NoCheatplus'.
* Might fix some plugin/server specific prefixes not being detected,
example: feed "/version" and expect "/bukkit:version" to be blocked.
2014-12-17 18:54:04 +01:00
asofold
c0a188d2c1 Make LogManager an interface.
* Some cleanups (spaces, commented out references updated).
* LogManager implement INotifyReload, but gets processed extra (not
added with addComponent).
2014-12-04 15:56:16 +01:00
asofold
a41b7a6329 Interpret a file name without extension as a directory, if not existent. 2014-12-04 15:04:11 +01:00
asofold
04d2896f7e [API CHANGE] Add debug flags to check data [missing: use that one].
For debug output now data.debug is used instead of config.debug, so the
data is initialized with the config.debug value. As an effect of this,
removing the data or reloading will override flags that have been set by
means of API-access only.

Affected:
* Adds getDebug and setDebug to ICheckData.
* Adds appropriate configs to all constructors of check data.
* Some per-check debug flags have been removed.

Extras: 
* spaces
* import cleanup.
2014-12-04 02:24:20 +01:00
asofold
ea57e5c3e1 Move Streams to NCPCore. 2014-11-19 08:36:53 +01:00
asofold
ec36e879d3 [BLEEDING] Use the new logging framework from now on (read details).
* All logging is also going into the log file (always), debug output is
mostly/only going into the log file. File logging uses an asynchronously
processed queue now (!).
* Specify an existing directory (e.g. logs) and log files will named
after date + sequence number, changing with every reloading of the
configuration.
* Console and ingame logging remain within the primary thread.
* No extra configurability for customization, yet.
* Not all places have been cleaned up, concerning log levels. target
streams and package naming.
* Work in progress.
2014-11-19 00:07:52 +01:00
asofold
2f4d689722 [PLACEBO] Raw sketch of the upcoming logging framework, doing nothing. 2014-11-18 23:54:43 +01:00
asofold
f49c64e89d Move StaticLogFile to NCPCommons, make use of the useBukkitLogger flag. 2014-11-17 15:40:04 +01:00
asofold
37c1da73ff Rename LogUtil to StaticLog. 2014-11-17 11:25:51 +01:00
asofold
1a88df80c5 Trim exceptions (depth 1), add tabs if header is used. 2014-11-12 19:53:44 +01:00
asofold
780d59d8a7 Use a utility method to get a String of a Throwable. 2014-11-11 20:28:49 +01:00
asofold
0201e4178b Spaces. 2014-11-11 20:23:49 +01:00
asofold
1d78b4eac0 Update comments on cow mappings (problematic: equals/hashCode). 2014-10-31 11:57:50 +01:00