[SPIGOT-697] Client side glitch with PlayerInteractEntityEvent Created: 13/Mar/15  Updated: 11/Dec/17  Resolved: 15/Apr/15

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: John Doe Assignee: Thinkofname
Resolution: Fixed Votes: 0
Labels: PlayerInteractEntityEvent
Environment:

Linux, craftbukkit-1.8.3


Plugin: n/a

 Description   

If you event.setCancelled(true) in the PlayerInteractEntityEvent (or even in PlayerInteractAtEntityEvent) to prevent a player from breeding an animal or changing sheep wool color, it still looks like the event happened to the client.

Meaning, if i click on a sheep to change wool color, i see the new color on the sheep. But when i reconnect the sheep is back to the original color meaning it was not actually changed server side.

If i click an animal to put them in breeding mode, i can see the hearts over their head, however they do not actually breed and no baby is spawned.



 Comments   
Comment by John Doe [ 15/Mar/15 ]

If you setBreed() to false that would keep the animal from breeding ever. I am only wanting to cancel that single event not neuter the poor little guy. Example: A player has a farm, only that player can breed their own animals (permissions based) and not just any random player. This is why i am only trying to cancel the event.

And like i said, it DOES cancel it server side. It only glitches client side.

Comment by Chris Lutte [ 13/Mar/15 ]

As canceling breeding you need to get the Entity clicked on and set its use its setBreed and set it to false, this should stop the animal from breeding, if the animal happens to be a baby it will force it to turn into an adult if you set it to true.

Comment by Chris Lutte [ 13/Mar/15 ]

Try using the SheepDyeWoolEvent event as thats what its for. Try that and report the results.

Generated at Sat Dec 13 15:17:45 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.