[SPIGOT-6779] Player#attack does not function Created: 01/Nov/21 Updated: 02/Nov/21 Resolved: 02/Nov/21 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | JishunaMatata | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | entity |
Version: | 3271-Spigot-3892929-cef1fda |
Guidelines Read: | Yes |
Description |
The attack() method does not work when used on a player instance. I believe this is due to the fact that EntityHuman#attack is a separate method from EntityLiving#attackEntity |
Comments |
Comment by Doc [ 02/Nov/21 ] |
i see in NMS Player use attack and not attackEntity..
and in Player the method attack is used for spectate entity if the player is in spectator if not then use the EntityHuman#attack i make a PR based in this for check in method if the entity where is called in Human. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/950/overview |