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

after the player is kicked by NoCheatPlus, the player freezes on the server and it cannot be kicked #46

Open gomin1d opened 4 years ago

gomin1d commented 4 years ago

Full output of /ncp version

> ncp version
[02:59:39 INFO]: ---- Version information ----
[02:59:39 INFO]: #### Server ####
[02:59:39 INFO]: git-Paper-108 ~MC: 1.16.1~
[02:59:39 INFO]:   detected: 1.16.1
[02:59:39 INFO]: #### NoCheatPlus ####
[02:59:39 INFO]: Plugin: 3.17-SNAPSHOT-Updated-b60
[02:59:39 INFO]: MCAccess: 1.13-1.16|? / Bukkit-API
[02:59:39 INFO]: Features:
[02:59:39 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 | MCAccessBukkitModern
[02:59:39 INFO]:   checks: FastConsume | Gutenberg | HotFixFallingBlockPortalEnter | AttackFrequency | FlyingFrequency | KeepAliveFrequency
[02:59:39 INFO]:   defaults: pvpKnockBackVelocity
[02:59:39 INFO]:   packet-listeners: UseEntityAdapter | MovingFlying | OutgoingPosition | KeepAliveAdapter | SoundDistance | WrongTurnAdapter | NoSlow | Fight
[02:59:39 INFO]: Hooks: AllViolations~NCP~ 1.0 | ViolationFrequency~NCP~ 1.0
[02:59:39 INFO]: #### Related Plugins ####
[02:59:39 INFO]: ProtocolLib v4.6.0-SNAPSHOT-b472 | ViaVersion v3.0.1

Describe the issue

I have a standard config, all I did was put the plugin in plugins.

Players are kicked for "Block breaking out of sync" and very often with the following error:

[13:33:11] [Server thread/INFO]: [NC+] nUwUn failed WrongBlock: tried to break another block than interacted with last (VL31)
[13:33:11] [Server thread/INFO]: nUwUn lost connection: (!) Block breaking out of sync.
[13:33:11] [Craft Scheduler Thread - 1672/WARN]: [NoCheatPlus] Failed to execute the command 'ncp kick nUwUn (!) Block breaking out of sync.': Unhandled exception executing command 'ncp' in plugin NoCheatPlus v3.17-SNAPSHOT-Updated-b60, please check if everything is setup correct. -> log once id=1820825993
[13:33:11] [Craft Scheduler Thread - 1672/WARN]: [NoCheatPlus] org.bukkit.command.CommandException: Unhandled exception executing command 'ncp' in plugin NoCheatPlus v3.17-SNAPSHOT-Updated-b60
    org.bukkit.command.PluginCommand.execute(PluginCommand.java:47)
    org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
    org.bukkit.craftbukkit.v1_16_R1.CraftServer.dispatchCommand(CraftServer.java:794)
    fr.neatmonster.nocheatplus.actions.types.CommandAction.execute(CommandAction.java:62)
    fr.neatmonster.nocheatplus.actions.types.CommandAction.execute(CommandAction.java:33)
    fr.neatmonster.nocheatplus.checks.ViolationData.executeActions(ViolationData.java:197)
    fr.neatmonster.nocheatplus.checks.Check.executeActions(Check.java:168)
    fr.neatmonster.nocheatplus.checks.Check.executeActions(Check.java:150)
    fr.neatmonster.nocheatplus.checks.blockbreak.WrongBlock.check(WrongBlock.java:91)
    fr.neatmonster.nocheatplus.checks.blockbreak.BlockBreakListener.onBlockBreak(BlockBreakListener.java:178)
    sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:498)
    fr.neatmonster.nocheatplus.event.mini.MultiListenerRegistry$AutoListener.onEvent(MultiListenerRegistry.java:82)
    fr.neatmonster.nocheatplus.event.mini.MiniListenerNode.onEvent(MiniListenerNode.java:157)
    fr.neatmonster.nocheatplus.event.mini.EventRegistryBukkit$4.execute(EventRegistryBukkit.java:124)
    co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
    org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
    org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)
    net.minecraft.server.v1_16_R1.PlayerInteractManager.breakBlock(PlayerInteractManager.java:324)
    net.minecraft.server.v1_16_R1.PlayerInteractManager.a(PlayerInteractManager.java:91)
    net.minecraft.server.v1_16_R1.EntityPlayer.tick(EntityPlayer.java:440)
    net.minecraft.server.v1_16_R1.WorldServer.entityJoinedWorld(WorldServer.java:831)
    net.minecraft.server.v1_16_R1.World.a(World.java:932)
    net.minecraft.server.v1_16_R1.WorldServer.doTick(WorldServer.java:525)
    net.minecraft.server.v1_16_R1.MinecraftServer.b(MinecraftServer.java:1353)
    net.minecraft.server.v1_16_R1.DedicatedServer.b(DedicatedServer.java:377)
    net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1212)
    net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1000)
    net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
    java.lang.Thread.run(Thread.java:748)

after that, the player can no longer log into the server, because his previous Player remained in the system.

the player remains in the Tab-list forever
you can teleport to the player, although he is invisible
you cannot kick the player, the kick command does not work on him

How to reproduce the issue

perhaps use a cheat client to trigger the check "[NC +] nUwUn failed WrongBlock: tried to break another block than interacted with last (VL31)"

Extra links/Videos (Including debug logs)

is absent

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

I have standard settings

gomin1d commented 4 years ago

it seems to me that it would be better if the StringUtil.throwableToString method
added information about Throwable.getCause to the log

TheForgottenKing commented 4 years ago

Can confirm, have had this issue.