Bukkit/CraftBukkit — pull request #1206 by Black-Hole (2013-07-17 01:14:40+00:00)
Title: [B+C] Implemented LeadKnot. Adds BUKKIT-4570

The Issue:

There is no entity class in Bukkit for lead knots.

Justification for this PR:

Lead knots are entities created by player while right clicking a fence with at least one entity on a leash. In Bukkit there is no corresponding entity class.
Also there is no event called when placing a lead knot.

PR Breakdown:

CraftLeadKnot is extending CraftHanging. In ItemLeash a HangingPlaceEvent is called if a new LeadKnot is created. If this event is canceled, the LeadKnot is immidiately removed. All the leashes remain in the hand of the player in this case. Other events are handled in CraftHanging already.

Testing Results and Materials:

Working fine. Detailed material on request.

Relevant PR(s):

B-905 - https://github.com/Bukkit/Bukkit/pull/905
B-897 - https://github.com/Bukkit/Bukkit/pull/897 (for leashing Entities)
CB-1190 - https://github.com/Bukkit/CraftBukkit/pull/1190 (for leashing Entities)

JIRA Ticket:

BUKKIT-4570 - https://bukkit.atlassian.net/browse/BUKKIT-4570