Anti cheating plugin for Minecraft (Bukkit/Spigot).
Go to file
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
NCPBuildBase More space available! 2017-04-13 21:24:53 +02:00
NCPCommons [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
NCPCompatBukkit [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
NCPCompatNonFree Add a cblegacy profile. 2018-01-10 02:02:05 +01:00
NCPCompatNonFreeJar Obtain the "non free" modules via a pre-built jar by default. 2018-01-10 01:54:08 +01:00
NCPCompatProtocolLib [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
NCPCore [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
NCPPlugin [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
NoCheatPlus [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
CONTRIBUTING.md Tickets are now on GitHub: https://github.com/NoCheatPlus/Issues/issues 2015-12-12 23:48:17 +01:00
LICENSE.txt Put license on top level. 2013-01-12 01:04:23 +01:00
README.md [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00
add_gplv3_header.py Add GPLv3 headers where missing. 2018-01-17 23:52:50 +01:00
pom.xml [BROKEN] Data storage overhaul (basics). (+) 2018-02-26 12:15:53 +01:00

README.md

NoCheatPlus

NoCheatPlus is a fork of the famous anti-cheat plugin NoCheat created by Evenprime. NoCheatPlus attempts to enforce "vanilla Minecraft" mechanics, as well as preventing players from abusing weaknesses in Minecraft or its protocol, making your server more safe. Organized in different sections, various checks are performed to test players doing, covering a wide range including flying and speeding, fighting hacks, fast block breaking and nukers, inventory hacks, chat spam and other types of malicious behaviour. For a more complete list have a look at the always outdated Features Page.

Installation

  • Install a Spigot server
  • Download NoCheatPlus
  • Drop the NoCheatPlus.jar in to the plugins folder.
  • Start your Spigot/CraftBukkit server. (Using /reload can have unwanted side effects with players still online, but also with complex plugins and cross-plugin dependencies, so we don't recommend it. Usually it should work with NCP.)

Hints

  • Be sure that your Spigot/CraftBukkit and NoCheatPlus versions match together. The latest version of NCP is compatible with a wide range of CraftBukkit/Spigot versions (See the notable builds page for a quick overview.).
  • Don't use tabs in the config.yml file.
  • Use ProtocolLib for full efficiency of the fight checks and other. Using a version of ProtocolLib that is supported by NCP is essential, as otherwise some checks will be disabled.
  • For compatibility with other plugins such as mcMMO, citizens and more check out CompatNoCheatPlus.
Project
Download
Support and Documentation
Developers
Obtain a build of Spigot

Compiling NoCheatPlus

  • NoCheatPlus used to be compiled with java 6 compliance (note OpenJDK, possibly we'll switch to 8 directly, once appropriate, e.g. with ProtocolLib dropping support for 7.).
  • We use Maven 3 to handle the dependencies. Tested both with Eclipse and Jenkins is Maven 3.3.9.
  • You can compile with this Maven goal: mvn clean package, for a build without any of the "non free" modules, which depened on not publicly downloadable resources, such as the CraftBukkit/Spigot server jar - the reflection based compatibility module is still contained.
  • In order to include a pre-built jar with the "non free" modules contained, use -P nonfree_include.
  • To also (re-) build "non free" compatibility modules, use -P nonfree_build as well as activating the appropriate module to build via a profile such as -P cbdev - see the tables below for reference.
  • Have a look at the NCPCompatNonFree sub module for reference on how to add custom compatibility modules. If you add custom modules with a different package naming than fr.neatmonster, you might have to update the includes section within NCPCompatNonFreeJar as well. The related factories are located within the NCPPlugin module (e.g. MCAccessFactory).
  • "Non free" jar file dependencies needed for the dedicated compat modules, which your local maven repository might be missing, can be installed manually. Example for Eclipse with embedded maven: Add a new maven build run configuration, name it appropriately, e.g. Install CB 1.7.5. Set goals to: install:install-file -Dfile=<PATH TO JAR> -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.7.5-R0.1-SNAPSHOT -Dpackaging=jar On Windows the might look like: X:\...\craftbukkit\3042\craftbukkit-1.7.5-R0.1-20140408.020329-16.jar To let it run you might have to set the base directory, e.g. to ${workspace_loc}, it does not seem to have significance. Do set the correct version alongside the file name. On newer version of maven, you might do with much simplified goals, because the pom files inside the jars are parsed.
    • The latest versions of BuildTools.jar will automatically install the created server jars into the local .m2 repository (e.g. on linux) - provided configuration paths are standard. Thus you don't need to do this manually anymore, if you then build NCP with the specific profile, if you have run BuildTools.jar to generate the server jars on that machine/environment.

Options and profiles related to enabling/disabling including/building "non free" compatibility modules.

Profile Parameter Description
-P nonfree_include none The "non free" modules are included via a pre-built jar file from the repository.
-P nonfree_build none Enable building "non free" compatibility modules. The NCPCompatNonFree jar file is built/installed/(deployed).
none none The "non free" modules are neither built, nor included via a pre-built jar file.

Profiles for choice of "non free" compatibility modules to build:

Profile Description
none Default build without any of the native access modules, might pose compatibility issues with latest Minecraft versions. The reflection based module is included here.
-P all All compatibility modules.
-P cbdev The latest version in development.
-P spigot1_12_r1 Spigot 1.12 R1 (MC 1.12-1.12.2).
-P spigot1_11_r1 Spigot 1.11 R1 (MC 1.11-1.11.2).
-P spigot1_10_r1 Spigot 1.10 R1 (MC 1.10-1.10.2).
-P spigot1_9_r2 Spigot 1.9 R2 (MC 1.9.4).
-P spigot1_8_r3 Spigot 1.8 R3 (MC 1.8.4-1.8.8).
-P spigot1_7_r4 Spigot 1.7 R4 (MC 1.7.10).
-P cblegacy The pre-DMCA CraftBukkit builds.

(On the long run, only the latest module for a major Minecraft release may be be kept, such as 1_8_r3 for all of 1.8.x.)