Commit Graph

543 Commits

Author SHA1 Message Date
asofold
41e9d89efa Add info about version-dependent features to the "ncp version" command.
* Add methods to NoCheatPlusAPI to add/set/get version tags.
* Display all tags in the ncp reload command.
* Alter test framework to set a dummy API.
* Add tags for blocks, net checks, FastConsume.
2015-01-05 16:34:07 +01:00
asofold
5f106dce1b Soft-depend on Carbon to ensure load order. 2015-01-05 14:38:49 +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
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
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
5dd5f8b87c Remove error markers. 2014-12-01 00:06:41 +01:00
asofold
e454930569 Remove unused method (dependency on ConfigManager). 2014-11-29 16:00:18 +01:00
asofold
a064a9afce [BLEEDING] Add dev-support for 1.8/Spigot. 2014-11-29 01:55:55 +01:00
asofold
0561638105 Add STATUS stream and use instead of INIT in some places.
* STATUS logs to console and default file, using queues.
* StaticLog logs to STATUS during runtime.
2014-11-23 15:47:10 +01:00
asofold
3460e29246 Remove StaticLog.schedule... and toString(Throwable). 2014-11-21 23:45:02 +01:00
asofold
3364d487cf Fix logging task (sync) not registering. Shuffle init order. 2014-11-19 23:09:14 +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
37c1da73ff Rename LogUtil to StaticLog. 2014-11-17 11:25:51 +01:00
asofold
d5cefe4c5a Add dedicated compatibility module for CB 3100 (MC 1.7.10). 2014-11-11 21:44:40 +01:00
asofold
4caec8aa63 Add tests for log actions. 2014-11-06 02:23:25 +01:00
asofold
7b2a680ead [BLIND] Add dedicated compatibility module for Glowstone.
This is extending the classes for Bukkit (API only), and only overriding
very few methods, such as getCommandMap, dealFallDamage.
2014-10-26 20:25:00 +01:00
asofold
7743dd9d8a Only print debug info, if the flag is set. + Spaces. 2014-08-07 18:56:05 +02:00
asofold
4e9e935b1e Extend tersting for Passable + move NCPCore tests to NCPPlugin.
Tests (partly re-) added and extended, classes moved, some methods
moved.

Some tests will fail if you don't use the next commit as well.
2014-08-05 18:49:35 +02:00
asofold
29000fbdb7 Add tests for PassableRayTracing (+spaces).
To make this works we change LogUtil to allow logging to console, and
initialize BlockProperties with MCAccessBukkit and use a fake
BlockCache, that allows to set blocks with an access method, so that we
can test ray-tracing.

The testEmptyCorner test would fail with the current implementation.
2014-08-04 21:35:43 +02:00
asofold
e84027a919 Set wasInBed in postEnable to prevent kicking with plugin managers. 2014-08-01 22:09:14 +02: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
d55cd7e4b6 Add a generic instance factory to the API.
This allows storing useful objects in the registry.
2014-07-27 15:17:08 +02:00
asofold
04b82ad0a6 [BLEEDING] Peek into ProtocolLib to fight certain packet spam (3).
This lessens or removes most effects of spamming the PacketPlayInFlying
(3, legacy 10), such as "magnet" or "repell" effects.
2014-07-12 22:30:51 +02:00
asofold
56611cd44b [BLEEDING] Set CompatCBDev to CB for MC 1.7.10. 2014-07-12 18:15:45 +02:00
asofold
8f32c822dc Add dedicated compat module for CB 1.7.8|1.7.9. 2014-07-12 17:46:42 +02:00
asofold
8da49e49f6 Update MCAccessCBDev to use CB 1.7.9-R0.2, update readme.md. 2014-06-14 18:37:20 +02:00
asofold
b669d65b92 No need to call super.onLoad. 2014-05-31 16:26:54 +02:00
asofold
f60d971f3c [BLIND] Add support for MC/CB 1.7.8. Minimal checks by code inspection. 2014-04-14 23:08:01 +02:00
asofold
2434c71d20 Add dedicated compat module for CB 1.7.5-R0.1. 2014-04-14 22:40:06 +02:00
asofold
2aa7ffab8e Alter the warning and error messages for MCAccess. 2014-04-05 00:29:07 +02:00
asofold
90a1255229 [BLIND] Dedicated compat module for 1.7.2. Set CompatCBDev to MC 1.7.5. 2014-03-25 00:32:38 +01:00
asofold
16db04f397 Officially drop compatibility for before CB 1.4.5-R1.0 ! 2014-02-23 00:38:31 +01:00
MyPictures
add2179dc9 Cleanup "ASCII art" from the sourcecode
Wiped every ASCII related thing that I could find in the NoCheatPlus
source.
2014-02-22 19:26:06 +01:00
asofold
fd33820c8e [BLIND/BLIEEDING/INSTABLE/INCOMPLETE] Secrets (read below).
Does this even compile anywhere?
2013-12-01 20:56:00 +01:00
asofold
71b37aab7b Add dedicated compatibility module for 1.6.4.
Can't set proper dependencies (bukkit repo seems warped).
2013-12-01 15:00:52 +01:00
asofold
a2dadf8a9c Remove metrics.
Metrics would need a different concept of what to add anyway.
2013-09-22 15:46:07 +02:00
asofold
a901823f9d [BLEEDING] Add 1.6.4 support. 2013-09-20 09:49:20 +02:00
asofold
41e1e8017b Add DisableListener component and use for DataManager and Improbable. 2013-09-19 21:00:57 +02:00
asofold
72e1ea8585 Corrections to plugin.yml. Add nocheatplus.shortcut.cheater. 2013-09-18 18:21:04 +02:00
asofold
ed0f08ed23 Use postEnable for one time tasks, log start and end. 2013-09-13 02:53:09 +02:00
asofold
182bc81c8c Set 1.6.2-R1.0 as new Bukkit/CB dependencies, add dedicated module. 2013-09-12 01:21:56 +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
af4c9b94f6 Move managelisteners to the compatibility section. 2013-08-12 22:20:44 +02:00
asofold
2219fa0e6f [CONFIG] Command protection: Change config sections + change to lists.
Commands to change to "no permission" or "unknown command" behavior,
can now be configured with a string list each. Commands that have a 
permission set will have the default set to false, while commands that
don't have a permission will be altered to have a filter permission,
namely nocheatplus.filter.command.<commandname>.
2013-08-10 14:25:28 +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
13cb783c72 Add an annotation for registration order with INotifyReload.
SetupOrder allows to define a priority, so you can register
 ActionFactoryFactory instances before any checks get them.
 
 Default priorities are NCP core at -100, DataManager -80, rest at 0.
2013-07-18 01:42:07 +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
cf1c89d646 [BLEEDING] Change message sending queue from per-player to global.
Adds an API to queue messages (thread safe).
2013-07-14 22:04:42 +02:00
asofold
00836ac9d7 Change event priorities (join/world-change) + delay some admin messages. 2013-07-14 20:12:19 +02:00
asofold
f55e0d5742 Alter config version handling + make notification configurable.
Versions are saved in a subsection instead of the comment-header.
2013-07-14 19:19:07 +02:00
asofold
a97995c99a Re-add 1.6.1 native support (removing is not worth the support load). 2013-07-10 12:34:06 +02:00
asofold
543dcf57f5 Metrics/ticks: Use rounding + de-tweak counting up to 20. 2013-07-09 17:16:47 +02:00
asofold
295ecee2cd Cancel metrics if set so and still active, also reset metrics on reload. 2013-07-09 16:50:10 +02:00
asofold
e60006d6a3 Update pom.xml descriptions. 2013-07-06 14:49:24 +02:00
asofold
d5d7973654 [BLEEDING/INSTABLE] Set CompatCBDev to support 1.6.1 changes. 2013-07-02 12:35:18 +02:00
asofold
3b337d968d Change config path for protectplugins. 2013-06-30 19:28:52 +02:00
asofold
78f453c5c2 Update metrics. 2013-06-30 02:49:26 +02:00
asofold
a4556667fd Add dedicated 1.5.2 module. 2013-06-24 12:24:36 +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
8ea5eccaa0 Put commands on feet.
* Add a new base class for better sub-command handling also for
tab-completion (AbstractCommand).
* Alter package structure slightly, to group command-classes by purpose.
* Some renaming.
2013-06-11 21:17:06 +02:00
asofold
888c7d937a Add tags to PlayerData + implement a notify-off tag.
Not sure this is that much final, but PlayerData can now carry tags.
NoCheatPlus.sendAdminNotify... will now check PlayerData for the
"notify_off" tag, as a preparation for a command to turn off
notifications.
2013-06-11 20:06:57 +02:00
asofold
2bf28c4982 [BLEEDING] Move configuration for logging back-ends to sub-sections. 2013-06-11 00:36:43 +02:00
asofold
8f862fb3f6 Outer space again! 2013-06-07 15:23: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
dac80f9e32 Remove unneeded dependencies for NCPCore. 2013-05-27 14:33:24 +02:00
asofold
c77dbff23e [Bleeding] Add FastConsume, if available will replace instanteat.
Somewhat hacky still, not sure it actually works too well.
2013-05-23 09:44:24 +02:00
asofold
37f4881f6f Filter plugin.yml from the NoCheatPlus pom to get content right. 2013-05-22 22:03:35 +02:00
asofold
e06e55a752 Put a pom for building into the NoCheatPlus module until knowing better. 2013-05-22 21:00:37 +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
asofold
463700cb3a [BREAKING API] Add module NCPCore between NCPCompat and NCPPlugin.
* Static utility NCPAPIProvider instead of NoCheatPlus.getAPI().
* Extend NoCheatPlusAPI: Some previously static access methods are now
part of the NoCheatPlusAPI interface instead. MCAccessHolder is
implemented and allows external setting of MCAccess.
* Fix some static members/calls to non-static.
* Moving some packages to NCPCore.
* Prepares for moving most check stuff between NCPCompat and NCPPlugin
to allow more optional higher level components.
2013-05-21 22:49:05 +02:00
asofold
6e6b198188 Move auxiliary code. 2013-05-21 15:51:51 +02:00
asofold
43d1c4aad0 SurvivalFly: Add tag lowfoodsprint for debugging purposes.
This tag is added if the player is sprinting but the food level has
dropped. Not sure this can actually be the case.
2013-05-21 14:56:19 +02:00
asofold
2319830873 [Incomplete] First go at shift+double-click on items with item on
cursor.
2013-05-15 01:37:21 +02:00
asofold
52b28bdfb4 [Bleeding] Add "sprintinggrace" concept to moving.
This allows setting a grace-period which allows that amount of seconds
longer sprinting even though the food level just dropped below minimum
for sprinting. This will hopefully reduce seldom false positives as well
as improve compatibility with other plugins like Heroes, which have
skills that add velocity and at the same time decrease the food level
below sprinting-limit (fp on landing).
2013-05-14 19:39:45 +02:00
asofold
9ae355c537 Iterate over the wrong list. 2013-05-11 01:02:47 +02:00
asofold
ac4d103cc1 Use ArrayList / index iteration here. 2013-05-11 00:56:33 +02:00
asofold
a277cbc96e Set version to 3.9.2 - back to development. 2013-05-10 13:59:58 +02:00
asofold
c45e92b50b Update checks and notifications are not processed anyway. 2013-05-06 00:31:18 +02:00
asofold
2457f031f2 Set version to 3.9.1-RC2 for second release attempt 2013-05-06 00:25:36 +02:00
asofold
9af9bcc7e9 Set version to 3.9.1-RC for release on BukkitDev. 2013-05-04 01:18:59 +02:00
asofold
384c3483ca Add configuration for ender-pearl checks to the combined section. 2013-05-03 11:13:53 +02:00
asofold
3e96d7d9a2 [Experimental] Add "strictinvalidation" flag to velocity config.
This allows triggering the invalidation for the active horizontal
velocity at half of the allowed speed instead of full, in case of
setting the flag to false.
2013-05-01 22:44:19 +02:00
asofold
5e8cf481a1 [Bleeding] Set dependency for dev-module to CB 1.5.2-R0.1. 2013-05-01 20:36:16 +02:00