class TeamLeaderChangeEvent extends Event

Event thrown when a player gets the leadership of a team

Methods

__construct(Team $team, Player $newLeader, Player $oldLeader)

Create a new event

getTeam()

Get the team

getNewLeader()

Get the new leader of the team

getOldLeader()

Get the former leader of the team

notify(string $type)

Send a notification to the players affected by this event

Details

at line line 37
__construct(Team $team, Player $newLeader, Player $oldLeader)

Create a new event

Parameters

Team $team The team in question
Player $newLeader The new leader of the team
Player $oldLeader The former leader of the team

at line line 49
Team getTeam()

Get the team

Return Value

Team

at line line 59
Player getNewLeader()

Get the new leader of the team

Return Value

Player

at line line 69
Player getOldLeader()

Get the former leader of the team

Return Value

Player

at line line 77
notify(string $type)

Send a notification to the players affected by this event

Parameters

string $type The type of the event