Skip to content

Anti-Cheat plugin for Minecraft (Nukkit/PM1E/PowerNukkitX)

License

Notifications You must be signed in to change notification settings

Physical-Science-Academy/NoCheatPlus

Repository files navigation

NoCheatPlus



  • An advanced AntiCheat worked on Nukkit/PetteriM1EditionNukkit/PowerNukkitX.

  • Learning from a well-known anti-cheat NoCheatPlus from Bukkit(Spigot).

  • We are in order to fix the bugs in Nukkit and prevent players from cheating.

  • You are supported to contribute, and give us a star to support our development.


Current Features

  • High-Performance、Low Occupancy、High Efficiency
  • Light、International、Open Source
  • Protect your server, and prevent it from crashing
  • prevent players from cheating on your server

Links

Docs/Wiki
Download
Supports
Developers
Nukkit Support
Related Plugins And Addons
  • This is a debugging plugin, it can make your NCP only remind the kicked player through the Title without actually kicking it, it can be used to debug the configuration of the plugin.

  • This is a CPS detection extension component. It uses the detection algorithm of the well-known small game server EaseCation, and obtains cps at intervals. If it is higher than the threshold every time, the anti-cheat will kick it. Using this plugin will automatically close the CPS detection system of NCP itself.

  • This is an extension component of NCP, which provides a visual operation panel and player reporting system for NCP. All of its language themes and even commands can be customized in configuration files.

  • This is an extension of NCP, which allows you to manually compatible with other plugins to reduce the misjudgment caused by anti-cheat due to non-support, such as double jump.


  • This is an extension plug-in of NCP, which synchronizes NCP ban data to the database for group server data synchronization, and relies on the plug-in DbLib. If you have NCPPanel installed, it can even sync panel data.


  • This is an extension for NCP that will turn your NCP into a passive static anti-cheat. Anti-cheat doesn't work normally, it only detects a player after it has been reported by other players. It does not have a reporting system itself, and NCPPanel needs to be installed.


  • This simple and effective NCP Extension provides a web interface to manage the No-Cheat-Plus Anticheat on your Minecraft NukkitX server. With this plugin, server administrators can easily monitor and adjust settings for fair gameplay in a Webview without having to deal with manual configuration files.


🎉Progress

  • SurvivalFly(97%)
  • CreativeFly
  • Speed(20%)
  • FastEat
  • NoSlow(50%)
  • InventoryMove
  • InventoryFastClick
  • NoFall
  • Velocity
  • Phase
  • Crasher
  • Client
  • MorePacket
  • FastBreak
  • Scaffold
  • KillAura
  • Reach
  • X-Ray
  • AutoClicker
  • HitBox
  • Helper Tool GUI

Installation & Setup

  • Java CI: https://ci.lanink.cn/job/NoCheatPlus

  • Download the latest NoCheatPlus-1.0-SNAPSHOT-jar-with-dependencies.jar on CI

  • and put it in your folder plugins/.

  • And It needs Library plugin

  • KotlinLib

Build JAR file

Require: Kotlin | Java (8|17)

  • git clone https://github.com/Physical-Science-Academy/NoCheatPlus.git
  • cd NoCheatPlus
  • git submodule update --init
  • ./mvnw clean package
  • The compiled JAR can be found in the target/ directory.

Command

  • /ncp get the version info
  • /ncp version get the version info
  • /ncp reload reload the config currently
  • /ncp debug toggle the debug mode
  • /ncp ban ban a player
  • /ncp unban unban a player
  • /ncp kick kick a player
  • /ncp toggle Switch detection
  • /ncp permission manage permissions.

Config

  • Then let's run the server.
  • You can ser a folder was created inplugins/ named NoCheatPlus.
  • Here we pay attention to the main config ncpconfig.yml.
# NoCheatPlus AntiCheat Config
config-version:
  notify: false
  version: 1000

# Currently "en" and "zh" are supported languages
# You are able to create your own language in the "lang" config directory
lang: "en"

logging:
  active: true
  auto-delete-days: 1
  debug: false
  prefix: "§c§lNCP §7>> §r"
  extended:
    command: true
    violation: true
actions:
  waring_delay: 10
  kick_broadcast: "§c§lNCP §7>>@player has been kicked for @hack"
protection:
  net:
    packet: true
    chunk:
      active: true
      dynamicScan: false
      scanHeight: 6.0
      scanWorld:
        - world
      filter:
        - 0
        - 8
        - 9
        - 10
        - 11
        - 20
        - 26
        - 27
        - 30
        - 31
        - 32
        - 37
        - 38
        - 39
        - 40
        - 44
        - 50
        - 63
        - 64
        - 65
        - 66
        - 68
        - 71
        - 81
        - 83
        - 85
        - 96
        - 101
        - 102
        - 104
        - 105
        - 106
        - 107
        - 126
        - 141
        - 142
      ores:
        - 14
        - 15
        - 16
        - 21
        - 56
        - 73
        - 74
        - 129
  command:
    hide:
      active: true
      message: "§c§lNCP §7>> §rYou do not have permission to run this command."
      commands:
        - "?"
        - "plugins"
        - "version"
        - "about"
        - "ver"
checks:
  blockbreak:
    fastbreak:
      active: true
      max: 35
      min: 0
      actions: "cancel vl>5"
  fight:
    speed:
      active: true
      maxspeed: 25
      dealvariance: 0.1
      cancelDamage: true
      actions: "cancel vl>5&&kick vl>20"
  inventory:
    instanteat:
      active: true
      actions: "cancel vl>5&&kick vl>20"
    move:
      active: true
      actions: "cancel vl>0&&kick vl>3"
    open:
      active: true
      actions: "cancel vl>0"
    fastclick:
      active: true
      delay: 50
      actions: "cancel vl>5&&kick vl>20"
    item:
      active: true
      actions: "kick vl>10"
  moving:
    survivalfly:
      active: true
      strict_mode: false
      setback_policy:
        fall_damage: true
        void_to_void: true
        latency_protection: 120
      actions: "cancel vl>20&&log vl>30 break=60&&warn vl>90 message=fly_short&&kick vl>100&&ban repeat=3 time=3,0,0"
    speed:
      active: true
    morepackets:
      active: true
      actions: "cancel vl>5&&kick vl>15&&ban repeat=3 time=3,0,0"
    creativefly:
      active: true
      actions: "cancel vl>20"
    nofall:
      active: true
      dealdamage: true
      skipallowflight: true
      resetonviolation: false
      resetonteleport: true
      resetonvehicle: true
      actions: "cancel vl>5&&log vl>10&&kick vl>20"
    vehicle:
      active: true
      actions: "cancel vl>10&&kick vl>50&&ban repeat=3 time=3,0,0"

string:
  kick: "§c§lNCP §7>> §rYou are kicked by NCP because of using @hack on server@next"
  ban: "§c§lNCP §7>> §rYou are banned by NCP for §c@days,@hours,@minutes,@seconds§r because of using @hack @nextEndTime: @end"
  fly_short: "@player could be flying hack @vl"

permission:
  no_permission: "§c§lNCP §7>> §rYou do not have permission to run this command."
  policy:
    - "nocheatplus.admin.all:reload,kick,ban,unban,debug,toggle,permission"
    - "nocheatplus.admin.helper:kick,ban,unban"
  bypass:
    # Custom bypass permission
    MOVING_CREATIVE_FLY:
      - "ncp.creativefly.bypass"

Custom Action System

  • There is an actions setting in each detection item, and the format of the penalty operation is given below:
  • Penalty Type Object A[ Relation] Object B Other parameters
  • The penalty types supported by connecting multiple penalty operations with &&
  • are as follows:
  • cancel Lag back a player
  • log Record the invalid action in NCP Logger,parameter break The Cooling Time
  • warn Send a warning message to player,parameter message The message you sent
  • kick Kick a player from server
  • ban Ban a player from server,parameter repeat Fault Tolerance Times,time Duration Of Ban
  • If no parameter is set, the plug-in will use NCP default value
  • to add warning message, which needs to be added in string.

NCP Commands Permission

  • Set it in permission.policy, and the format is:
  • Permission: Command Table
  • commands are connected by commas(,).
  • If there is no record of a command in NCP, all players can use it by default.
  • For example, the version is not specified in nocheatplus.admin.all and nocheatplus.admin.helper of the case.

NCP Custom Bypass Permission

Add them in permission.bypass,and the format is:

  • CheckType:Permissions(List) The player who has these permissions will bypass the check.

Available CheckType:

  • MOVING_SURVIVAL_FLY
  • MOVING_CREATIVE_FLY
  • MOVING_VEHICLE
  • MOVING_SPEED
  • MOVING_MORE_PACKETS
  • MOVING_NO_FALL
  • INVENTORY_INSTANT_EAT
  • INVENTORY_OPEN
  • INVENTORY_FAST_CLICK
  • INVENTORY_MOVE
  • FIGHT_SPEED
  • FIGHT_REACH

Video Showing

Development

  • NCP provides much API,to achieve many functions。see the api in NoCheatPlusAPI

    A work in progress API for NoCheatPlus

GroupId

  • com.github.Physical-Science-Academy.NoCheatPlus

Repository Version

ArtifactId Version
NoCheatPlus maven-repo-20220552-2a
NoCheatPlus maven-repo-20220552-3a
NoCheatPlus maven-repo-20220552-4a
NoCheatPlus maven-repo-20230618-common
CompatNCP maven-repo-20230618-common
ECCPCompat maven-repo-20230618-common
NCPLiteBan maven-repo-20230618-common
NCPPlugin maven-repo-20230618-common
NCPStaticBar maven-repo-20230618common

Gradle:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

	dependencies {
	        implementation 'com.github.Physical-Science-Academy.NoCheatPlus:CompatNCP:maven-repo-20220552-common'
	}

Maven:

Repository:
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
Dependencies:
<dependencies>
    <dependency>
        <groupId>com.github.Physical-Science-Academy.NoCheatPlus</groupId>
        <artifactId>NoCheatPlus</artifactId>
        <version>maven-repo-20220552-common</version>
    </dependency>
</dependencies>

Obtaining an instance of the API:

NoCheatPlusAPI api = NoCheatPlus.instance;

Method Description
getNCPProvider() get main class of NCP
getComManager() get component manager of NCP
getAllComponents() get all modules of NCP
getAllPlayerData() get all player data in NCP
addComponents(components: NCPComponent) register a NCP Module
hasPlayer(player: Player) judge a player's data is existed
getPlayerProvider(player: Player) get a player's data in NCP
getNCPLogger() get NCP Logger
getNCPConfig() get config file of NCP
getNCPBanRecord() get ban config of NCP
isPlayerBan(player: Player) judge a player if he is banned by NCP
kickPlayer(player: Player, type: CheckType) kick a player by NCP
banPlayer(player: Player, days: Int) ban a player by NCP
hasPermission(player: Player, command: String) judge a player if he is allowed to use this NCP's command
hasPermissionBypass(player: Player, type: CheckType) judge a playet if he is allowed to bypass this check
createBypassPermission(permission: String, type: CheckType) created a permission to bypass the check
removeBypassPermission(permission: String, type: CheckType) delete a permission which can bypass some checks
clearAllViolations(player: Player) clear all Violation Levels of a player

Test Server(Not always opens)

Official Asia (Closed)

  • Address: axe.0mc.me
  • Port: 10878

Official CN

  • Address: mc.catrainbow.me
  • Port: 20000

Personal Test Server 1

  • Address: 95.217.40.209
  • Port: 25009

Notice

  • Plugin are still in development. Report through Issue if you need!

Contact us