I\'m not quite sure what this means or whats it doing, Could some one elaborate?
Player player = (Player) sender;
It converts sender to a Player object. Otherwise, the datatype of player wouldnt match the datatype of sender. Usually done if sender could initially have been declared as a subclass.