Commit Graph

10 Commits

Author SHA1 Message Date
asofold 62df128efd [BLEEDING][BREAKING] MC 1.13 Material changes, first batch.
First batch:
* Initialize blocks somehow, so no errors nor missing blocks happen
during startup.

Possibly Missing:
* There might be references of removed/renamed material (blocks/items)
throughout the code.
* Some blocks may behave different now/then.

Missing:
* Block#getData may not reflect (all?) properties anymore.
* Block shape getting is missing. Block shapes are now (potentially)
more complex to process. Concept might be to keep a double array for the
rough bounds, and add an (optional +- null) array of arrays for sub
shapes, if present (IBlockCacheNode). So a first rough update is more
simple/compatible.
2018-08-20 12:37:51 +02:00
asofold 97d59045ae [BLEEDING][BREAKING][INSTABLE] Swiftly throw in permission caching.
Benefits:
* Improves performance, where permission lookup has major impact, with
timeout based lookup, static permissions (skip permission check
entirely), and world/offline based invalidation. (Once fully
implemented.)
* Hopefully more efficient: use Bukkit Permission for faster defaults.
* (Allows control over how which permission is to be
updated/invalidated, which is useful per se.)

Risks:
* Complex changes yield bugs.
* Other plugins depending on NCP might break.
* Cache incoherence might happen (permissions are changed dynamically +-
unintended malconfiguration, or in case of bugs).
* (Endless loops certainly have all been fixed.)

Breaking:
* Lots of more or less internal API has been changed or removed: Check,
CheckType, CheckUtils, TickTask, ...
* Permission checking behavior has been altered.

Rough points:
* Implement a permission cache within PlayerData.
* Remove the player tasks and permission updates in favour of handling
those within DataManager and PlayerData.
* Adjust everything else to it (partly TBD).
* Updating sets of permissions (e.g. for CHAT) is done more lazily now,
i.e. one per 10 ticks). An actual permission check would still yield an
update next tick (asynchronous).
* Fixed/extended random spots (DualCollection, MiniListener registration
support, StringUtil).

Missing:
* Basic implementation
  * Cleanup after logout (stages: 1. non-essential like permissions,
2. unrecoverable like set-back location, 3. complete data removal).
* Coverage
  * Might have missed spots.
  * NoCheatPlus.nameSetPerms should be replaced by caching + default
config for world-wise updating.
  * Command permissions are always checked. At least for players,
cache based lookup should get implemented.
  * More unit tests.
* Extended configurability: Per-world settings/policies.
* Efficiency
  * Not all parts of the implementation are 100%/optimal yet.
2018-01-30 23:09:34 +01:00
md_5 3a111dc4a5 Remove Block IDs 2017-12-06 16:55:29 +11:00
asofold 863b89763d [BREAKING] Move more classes around.
This time the focus is on the utilities package.

Possibly used, but not really official API:
* Move block cache to a 'map' sub-package.
* Move RichBounds/RichEntity/Player-Location and TrigUtil to a location
sub-package.

Not really official API, likely not used:
* Move AttribUtil to compat, since it belongs there.
* Split off direction check methods to collision.CollisionUtil.
* Move static BlockCache methods to map.MapUtil.
* Move food related methods from CheckUtils to InventoryUtil.
* Move vehicle/passenger related methods from CheckUtils to
PassengerUtil.

Not breaking:
* Move IdUtil to commons.
2016-06-21 09:56:50 +02:00
asofold bb8c8f4156 Add missing GPLv3 headers + accidentally add useless javadoc comments. 2016-06-18 17:57:16 +02:00
asofold af5fbd900a Move prefixes to loggers. 2015-11-15 02:44:01 +01:00
asofold 39cc75c162 Spaces. 2015-01-05 15:43:49 +01:00
asofold 37c1da73ff Rename LogUtil to StaticLog. 2014-11-17 11:25:51 +01:00
asofold f894a8da39 [BLIND] Add factory for vanilla blocks + early addition of 1.6 blocks. 2013-07-01 15:34:33 +02:00
asofold ce834675d7 Move most code to NCPCore, removes NCPCompat.
Factories are now on NCPPlugin level, thus all the core stuff can be in
one module, giving better source code browsing.

Updates has been moved into an updates package, because there is to be
expected more content, and to make utilities less fat.

To indicate the direction, the basic infra-structure has been added to
allow adding components to the DefaultComponentFactory. Further
processQueuedSubComponents is now called after each components adding in
order to allow more flexible registry features.
2013-05-22 12:24:48 +02:00