Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5673

Player#swingMainHand() and Player#swingOffHand() only display the swing for other players and not the player itself

XMLWordPrintable

    • This server is running CraftBukkit version git-Spigot-ae72bf4-183139d (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
    • Yes

      public class SwingCommand implements CommandExecutor {	@Override
      	public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
      		if(sender instanceof Player) {
      			Player p = (Player) sender;
      			p.swingMainHand(); //Only visible for other players
      		}
      		return true;
      	}}
      

      Only other players see the arm animation and the player, that actually swings the arm doesn't. It makes those methods basically useless.

       

      Install the attached TestPlugin and type /swing to reproduce. (You need multiple accounts!)

            Unassigned Unassigned
            LaserSlimeHD LaserSlime
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: