mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
Add flag to control the arm swing when updating npc (#106)
* fancynpcs: Add overloaded update and updateForAll methods to skip swing animation. * fancynpcs: remove unnecessary changes to other calls of update(player). * Revert version change * fancynpcs: pull default update(Player) method out to NPC class, and make non-abstract. * fancynpcs: make swinging arm default update behavior.
This commit is contained in:
@@ -191,7 +191,7 @@ public class Npc_1_20_1 extends Npc {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Player player) {
|
||||
public void update(Player player, boolean swingArm) {
|
||||
if (npc == null) {
|
||||
return;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class Npc_1_20_1 extends Npc {
|
||||
refreshEntityData(player);
|
||||
|
||||
if (data.isSpawnEntity() && data.getLocation() != null) {
|
||||
move(player, true);
|
||||
move(player, swingArm);
|
||||
}
|
||||
|
||||
NpcAttribute playerPoseAttr = FancyNpcsPlugin.get().getAttributeManager().getAttributeByName(org.bukkit.entity.EntityType.PLAYER, "pose");
|
||||
|
||||
Reference in New Issue
Block a user