Updated-NoCheatPlus / NoCheatPlus

Anti-cheating plugin for Minecraft (1.5-1.20, Bukkit/Spigot)
https://ci.codemc.io/job/Updated-NoCheatPlus/job/Updated-NoCheatPlus/
GNU General Public License v3.0
482 stars 100 forks source link

NPE on server start-up #166

Closed SlimeDog closed 2 years ago

SlimeDog commented 3 years ago

Full output of /ncp version

> ncp version
[17:19:54 INFO]: »Version information«
[17:19:54 INFO]: Server:
[17:19:54 INFO]: git-Paper-307 ~MC: 1.17.1~
[17:19:54 INFO]: Detected: 1.17.1
[17:19:54 INFO]: NoCheatPlus:
[17:19:54 INFO]: Plugin: 3.17-SNAPSHOT-Updated-b118
[17:19:54 INFO]: MCAccess: 1.13-1.17|? / Bukkit-API
[17:19:54 INFO]: Features:
[17:19:54 INFO]: blocks: BlocksMC1_4, BlocksMC1_5, BlocksMC1_6_1, BlocksMC1_7_2, BlocksMC1_8, BlocksMC1_9, BlocksMC1_10, BlocksMC1_11, BlocksMC1_12, BlocksMC1_13, BlocksMC1_14, BlocksMC1_15, BlocksMC1_16, BlocksMC1_17, MCAccessBukkitModern
[17:19:54 INFO]: checks: FastConsume, Gutenberg, HotFixFallingBlockPortalEnter, AttackFrequency, FlyingFrequency, KeepAliveFrequency
[17:19:54 INFO]: defaults: pvpKnockBackVelocity
[17:19:54 INFO]: packet-listeners: UseEntityAdapter, MovingFlying, OutgoingPosition, KeepAliveAdapter, SoundDistance, WrongTurnAdapter, NoSlow, Fight
[17:19:54 INFO]: Hooks:
AllViolations~NCP~ 1.0, InfiniteJump 1.2.13, ViolationFrequency~NCP~ 1.0
[17:19:54 INFO]: »Related Plugins«
[17:19:54 INFO]: ProtocolLib v4.7.1-SNAPSHOT-b533, ViaVersion v4.1.0-21w39a-SNAPSHOT

Describe the issue

NoCheatPlus throws a NPE on server start-up. Verified with two start-ups.

How to reproduce the issue

The issue did not occur with Paper b306.

The issue does not occur on Spigot 1.171.-3254 with the same configuration. Paper server is a copy from a Spigot backup made a few minutes previously, with only the MC variant changed.

Diagnostic output

[17:11:55] [Server thread/INFO]: [NoCheatPlus] Loading NoCheatPlus v3.17-SNAPSHOT-Updated-b118
[17:11:55] [Server thread/INFO]: [NoCheatPlus] onLoad: Early set up of static API, configuration, logging.
[17:11:55] [Server thread/INFO]: [NoCheatPlus] Logging system initialized.
[17:11:55] [Server thread/INFO]: [NoCheatPlus] Detected Minecraft version: 1.17.1
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Enabling NoCheatPlus v3.17-SNAPSHOT-Updated-b118
[17:12:17] [Server thread/INFO]: [NoCheatPlus] McAccess set to: 1.13-1.17|? / Bukkit-API
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Applied block patches for multi client protocol support: water_lily, soil, vine, honey_block, shulker_box
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Update block-info: Block shape patch for multi client protocol support around 1.7.x - 1.17.x.
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Inventory checks: FastConsume is available, disabled InstantEat.
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Adding packet level hooks for ProtocolLib (MC 1.17.1)...
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Confirm teleport packet available (via name): TELEPORT_ACCEPT[class=PacketPlayInTeleportAccept, id=0]
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Available (and activated) packet level hooks: UseEntityAdapter | MovingFlying | OutgoingPosition | KeepAliveAdapter | SoundDistance | WrongTurnAdapter | NoSlow | Fight
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Force disable FastHeal, FastConsume, PacketFrequency and InstantBow on Minecraft 1.9 and later.
[17:12:17] [Server thread/INFO]: [NoCheatPlus] Version 3.17-SNAPSHOT-Updated-b118 is enabled.
[17:12:18] [Server thread/INFO]: [InfiniteJump] NoCheatPlus hook enabled
[17:12:59] [Server thread/INFO]: +> [Depenizen] Depenizen loaded bridge for 'NoCheatPlus'! 
[17:13:00] [Craft Scheduler Thread - 16 - NoCheatPlus/INFO]: [NoCheatPlus] Added hook: AllViolations(NCP) [1.0].
[17:13:00] [Craft Scheduler Thread - 16 - NoCheatPlus/INFO]: [NoCheatPlus] Added hook: ViolationFrequency(NCP) [1.0].
[17:13:00] [Craft Scheduler Thread - 16 - NoCheatPlus/INFO]: [NoCheatPlus] Added hook: InfiniteJump [1.2.13].
...
[17:13:02] [Server thread/INFO]: [NoCheatPlus] Post-enable running...
[17:13:02] [Server thread/ERROR]: [NoCheatPlus] Failed to apply command protection: NullPointerException
[17:13:02] [Server thread/ERROR]: [NoCheatPlus] java.lang.NullPointerException: input
        java.base/java.util.Objects.requireNonNull(Objects.java:233)
        net.kyori.adventure.text.flattener.ComponentFlattenerImpl.flatten0(ComponentFlattenerImpl.java:79)
        net.kyori.adventure.text.flattener.ComponentFlattenerImpl.flatten(ComponentFlattenerImpl.java:75)
        net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializerImpl.serialize(LegacyComponentSerializerImpl.java:306)
        org.bukkit.command.Command.getPermissionMessage(Command.java:323)
        NoCheatPlus-3.17-b118.jar//fr.neatmonster.nocheatplus.permissions.PermissionUtil.protectCommands(PermissionUtil.java:167)
        NoCheatPlus-3.17-b118.jar//fr.neatmonster.nocheatplus.NoCheatPlus.setupCommandProtection(NoCheatPlus.java:830)
        NoCheatPlus-3.17-b118.jar//fr.neatmonster.nocheatplus.NoCheatPlus.postEnable(NoCheatPlus.java:1119)
        NoCheatPlus-3.17-b118.jar//fr.neatmonster.nocheatplus.NoCheatPlus.access$100(NoCheatPlus.java:151)
        NoCheatPlus-3.17-b118.jar//fr.neatmonster.nocheatplus.NoCheatPlus$PostEnableTask.run(NoCheatPlus.java:276)
        org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
        org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
        net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1221)
        net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
        java.base/java.lang.Thread.run(Thread.java:831)

[17:13:02] [Server thread/INFO]: [NoCheatPlus] Post-enable finished.

Any possible config options changed or plugins that may cause interference?

No.

SlimeDog commented 2 years ago

Paper issue fixed and closed.