pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.26k stars 1.54k forks source link

Player can apply more damage and knockback by switching slots with instruments or air #4653

Closed ghost closed 2 years ago

ghost commented 2 years ago

Issue description

Steps to reproduce the issue

  1. Video

    OS and versions

    • Server version: 4.0.2 (git hash: 178dcb71a9a1139527dbb9ff2229dbcd61735e5c)
    • Minecraft version: 1.18.0 (protocol: 475)
    • PHP: 8.0.12
    • PHP JIT: No
    • OS: Linux Mint

Plugins

DevTools v1.15.0, EconomyAPI v5.7.3-PM4, PureChat v1.4.12, PurePerms v1.4.4, SkillAPI v1, SkillAPICommands v1

Crashdump, backtrace or other files

dktapps commented 2 years ago

This is expected, and is the same as the vanilla behaviour. https://github.com/pmmp/PocketMine-MP/blob/b9b1ba95261f90e61657a0220ca8a59fa0dad9d7/src/entity/Living.php#L375-L380