Commit Graph

51 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 30902ec352 [BROKEN] Data storage overhaul (basics). (+)
(SAFETY COMMIT)

Largely breaking change.
* Interfaces in front of data types (and 'managers'), some interfaces
removed.
* Data and configuration fetching.
* Check activation checking (config flags, isEnabled, hasBypass).
* CheckType (activation checks, factories removed).
* Lots of collateral signature changes, including IPlayerData.

The (I)WorldDataManager stores per-world data (+ per world per check
type).
* Raw configurations.
* Typical flags: check activation, debug, lag adaption.
* Generic data, such as check configurations or per world check data.

The (I)PlayerDataManager stores per player data.
* Check Data.
* Typical flags: debug
* Exemption
* Check data (and config cache).
* Further mappings and later OfflinePlayerData.
* The registration interface will allow defining, how instances are
handled for registered types (factory, proxy, what on world change, what
on logout, global removal handler, per player removal handler).

(I)PlayerData is intended to be/become the central access point.
* External interface is IPlayerData now.
* Per player debug flags, exemptions.
* Fetching configuration and data: local cache, relaying fetching to
registered factories and proxy-registries/storage (e.g. fetching
configuration from per world storage).

Other fixes/changes:
(+) Extend the debug player command (set true/false, reset to world
default, arbitrary check types).
(+) PlayerData maintains a currentWorldIdentifier (to be used instead of
ChatData in future).
(+) The WorldConfigProvider getAll implementation returns a
LinkedHashSet now, avoiding duplicates.
(+) Move DefaultGenericInstanceRegistry to NCPCore.
(+) Thread-safety considerations for DefaultGenericInstanceRegistry.
(+) Don't log errors on hasBypass checking. TBD: Instead intercept
during listener methods (or even as a feature within the listener node:
e.g. @ThreadContext(primaryThread=true, skipOffContext=true,
cancelOffContext=true).
(+) Add fight.wrongturn permissions to plugin.yml.
(+) Missing GPLv3 headers.

Broken/Missing:
* WorldData inheritance from default: propagate all changes done
directly to the default config to children (all worlds that don't have
an explicit world_config.yml set) - possibly add an OverrideState or
similar, (NONE, FROM_DEFAULT, EXPLICIT) and don't override EXPLICIT if
coming from the default. Calling override on the default WorldData is
not to be confused with calling override for WorldDataManager (override
for all worlds as EXPLICIT).
* Organize overriding for special circumstances (version dependent
activation  and the like). Might want to add registered override
handlers to be called on reload automatically.
* Store generic per check type per world data in the WorldDataManager,
such as configurations and per-world check data. TBD: Factories, cleanup
(!).
* Most efficient referencing (IWorldCheckTypeNode, IHandle<something>?).
* All the registry stuff (see PlayerData).
* Use interfaces for auto registry (and a flag within
RegistrationContext?) - world unload, world change, player join / leave.
* (Data expiration handling including transition to IOfflinePlayerData,
because now data is a little heavier.)
* Further details.
2018-02-26 12:15:53 +01:00
asofold 5d5e45e2df Set default child permissions in plugin.yml. 2018-02-07 16:54:03 +01:00
asofold 11be3c7c0d Register the inventory.open permission.
Found via auto-generating .silent check permissions :p.
2016-12-28 10:30:35 +01:00
asofold fc24fe529c [BLEEDING] Overall packet spam check for pre-1.9.
Not sure if this really pays, if most people use protocol-support
plugins that limit packets anyway. There could be some future use, e.g.
generic rate limiting with configurable implementation.

Other:
* New methods for RawConfigFile+ConfigManager to check for
AlmostBooleanS.
* Add all net check permissions to plugin.yml.
2016-06-26 22:18:43 +02:00
asofold 016d5894de Add the 'ncp stopwatch' command.
Taken from CG/customplg.
2016-06-03 21:43:08 +02:00
asofold 909e6d5404 Vehicles: Prepare new checks and use correct config paths.
Naming:
* Possibly not final.
 * survivalfly: Does not fit at all.
 * Separate official checks + sections for speed and fly: nope.
 * runfly: not running.
 * speedfly: mix up with too fast flying.
 * moving: too much redundancy with moving.vehicle.moving
 * envelope: so and so, possibly better with tags to be set.

 Content:
 * Prepare a vehicle moving envelope check (just basic pre-coding
bookkeeping and refactoring).
2016-04-22 18:11:41 +02:00
asofold 5d595cd275 [BREAKING] Prepare more refined vehicle checks.
* Split vehicle checks to another class. Needs refactoring.
* Add ability for simple generic instance registration by an interface.
* Add new sub check type MOVING_VEHICLE, with configuration section,
move existing stuff there (moving.vehicles.., morepacketsvehicle).
* Breaks at least the use of check type MOVING_MOREPACKETSVEHICLE.

FunFact:
* Try CheckType setup with MOVING_MOREPACKETS_VEHICLE(MOVING, ...) to
see why there is a test for this kind of thing.

Bugs:
* Old configuration paths don't seem to get removed with @Moved.

Missing:
* More refined vehicle checks.
2016-04-21 15:57:18 +02:00
asofold 86732764e3 [BLEEDING] Integrate net checks into the check system.
* Extend CheckConfigFactory with a remove-all method.
* DataManager.clearConfigs() now uses CheckType for getting factories.
* Split off Check.hasBypass method to check exemption + permission.
* Allow null permissions in CheckType (interpret as no bypass).
* Add Check types for FlyingFrequency and SoundDistance.
* Add exemption and actions to FlyingFrequency, alter defaults.
2015-01-30 16:10:43 +01:00
asofold aa126bf731 Remove an 'f'. 2015-01-19 20:14:00 +01:00
asofold a2e41452e7 Remove fight.knockback.
Measuring the time from sprint to attack doesn't work well. The
ctrl-sprint thing also adds to it. Better would be measuring the
toggle-sprint frequency and possibly combine it with some other measure
(packet level attack frequency?) then rather deal attack penalty time.
2015-01-19 13:45:07 +01:00
asofold 0fa307a8df Add a check for creating books with more than 50 pages. 2015-01-19 02:52:02 +01:00
asofold 5f106dce1b Soft-depend on Carbon to ensure load order. 2015-01-05 14:38:49 +01:00
asofold 5f9764dabc Add command "ncp debug player (player1) ...".
This is the first simple version, just setting debug for all checks for
the player(s). It can only be undone by removing the data, e.g. with
"ncp remove (player)", reloading does it too, but is much heavier.
2014-12-04 03:52:48 +01:00
asofold 256d06b67c Add permissions for JourneyMap/VoxelMap. 2014-12-04 03:09:17 +01:00
asofold 7d40df9d8c Rename the kicklist command to denylist. 2014-07-29 21:11:31 +02:00
asofold c2722abc19 Add the "ncp top" command, allowing to search all the violation history.
Original pull request:
https://github.com/NoCheatPlus/NoCheatPlus/pull/24

This probably is not the final implementation, but it allows some
minimal freedom:
* Specify number of entries to show.
* Specify check types (and groups!).
* Specify what to sort by.

There might be need for some merged view, combining several different
check types somehow, or just shortcuts for specific selections, e.g. for
fighting-related checks.

----

+ Fix root command not showing sub commmand usage.
2014-07-29 13:49:43 +02:00
asofold 1a010b8f43 Update/reorder command usage/description. 2014-07-28 01:26:10 +02:00
asofold 6ba234693a Add ProtoclLib to softdepend. 2014-07-27 23:45:24 +02:00
asofold 4176937dd1 Add a general purpose counter for stats/debug, and log+reset commands.
This may get changed around, e.g. to allow log output to file and other.
2014-07-27 20:22:53 +02:00
asofold e0f81b43b6 Command+perms rename: tempkick to denylogin and unkick to allowlogin.
Aliases are still set for commands and permissions, so this should not
break things.
2014-07-27 17:25:35 +02:00
asofold e05748ecfd Add the inspect command to usage. 2014-07-27 16:26:27 +02:00
asofold 72e1ea8585 Corrections to plugin.yml. Add nocheatplus.shortcut.cheater. 2013-09-18 18:21:04 +02:00
asofold 1d2f291650 Add "ncp inspect (player)" command, might be merged/changed with info. 2013-08-29 21:30:53 +02:00
asofold c8c7bbb37c Correct usage of "ncp exemptions". 2013-08-17 15:35:41 +02:00
asofold b3b13df83c Add nocheatplus.command.(exempt|unexempt|removeplayer).self permissions.
Somewhat incomplete, because the filter permission is not added for 
these. Might be fancy for the tester shortcut (less danger).
2013-08-10 03:16:16 +02:00
asofold fdf2009551 Use a testPermission method for sub-commands. 2013-08-10 03:06:08 +02:00
asofold 8b2c8fd29c Hasty - test before build. 2013-08-10 02:20:03 +02:00
asofold 858302b1ba More on permission changes.
* Fix color replacing in command protection (had no effect previously).
* Use "no permission" message for default bukkit command protection.
* Use command protection only, no more parsing pre process for /pl etc.
* Other tweaks (update descriptions, add shortcuts / child permissions).
2013-08-10 01:50:59 +02:00
asofold 0e56338336 Change feature (filter) permissions to nocheatplus.filter... 2013-08-09 23:50:59 +02:00
asofold 84c376864e Rework parts of permissions.
Changes are mostly backwards compatible.

Fixed:
* Filter permissions were wrong (not starting with nocheatplus).

Changed:
* Commands are grouped under nocheatplus.command now.
* Notification permission is independent of the notify command,
	 changed to nocheatplus.notify.

New:
* Shortcut permissions (nocheatplus.shortcut...) for safer use.
* Shortcut permission for testers: nocheatplus.tester
2013-08-09 18:09:24 +02:00
asofold f46618c619 Prefix series with s in order to not ever confuse with SNAPSHOT/RC. 2013-07-17 12:17:33 +02:00
asofold 793291b71b Build parameters: Add BUILD_SERIES. Add default values.
BUILD_SERIES = UNKNOWN
BUILD_NUMBER = ?
2013-07-17 11:35:45 +02:00
asofold c7b85f9faa Flying permissions: survivalfly is now child of creativefly. 2013-07-16 00:24:20 +02:00
asofold 21442c4e22 Use a filter permission to see if a player can use the root command.
The permission is set as child of all command permissions 
(sub commands of the root command). This is done in post enable to not
have to add it 100 times to the plugin.yml. Hopefully permission plugins
handle this right, superperms (permissions.yml) does.
2013-06-12 02:08:22 +02:00
asofold ae2d6142d9 Add command to turn notifications off and on again (per player). 2013-06-12 00:53:40 +02:00
asofold d01fa3e8a7 Too late to do it right! 2013-06-05 00:28:08 +02:00
asofold ed33d6af25 Add permission for FastConsume to plugin.yml. 2013-06-05 00:20:53 +02:00
asofold 04f2baed50 . 2013-04-23 23:45:38 +02:00
asofold cdcd7945e9 Update permissions in the plugin.yml + order. 2013-04-23 23:30:26 +02:00
asofold feaa09ad03 Add dev-url. 2013-03-03 16:40:15 +01:00
MyPictures 7ea09b7b61 Update plugin.yml
- Add missing admin.debug permission
- Rename InstantHeal to FastHeal
2013-02-23 21:41:56 +01:00
asofold 47862a651f We use liquid, not fluid. 2013-02-23 16:54:50 +01:00
asofold 6112d5b9fb [Bleeding] Add interact.speed check. 2013-02-17 19:45:49 +01:00
asofold 48ffb2f09f [Bleeding] Add blockinteract.visible check.
This check performs somewhat heuristic ray-tracing to see if a block
interacted with can actually be "seen", in terms of not reaching
through fully solid blocks. [Still needs for performance: more refined
conditions when to use + interact-speed check].
2013-02-17 17:49:50 +01:00
asofold ed56c3458f Add "/ncp version" command. 2013-01-25 20:41:38 +01:00
asofold 48c2d0ea53 Add fine grained permissions for Rei's Minimap's radar.
This merges pull request 4 (@slide23) in a slightly altered way, with
a little delay.
2013-01-18 22:43:16 +01:00
asofold e8208a12c5 Update permissions for chat checks in plugin.yml. 2012-12-27 14:30:02 +01:00
asofold 4b07eadc32 Corrections to versions. 2012-12-14 00:44:08 +01:00
asofold 5a98004552 Adjust version. 2012-12-13 23:50:53 +01:00