Renamed TeamEvent.TeamMakeLeaderEvent to TeamEvent.TeamSetOwnerEvent

This commit is contained in:
Florian CUNY 2018-10-28 10:19:55 +01:00
parent 13c483e5eb
commit 14a3ed6792
2 changed files with 8 additions and 8 deletions

View File

@ -62,7 +62,7 @@ public class IslandTeamSetownerCommand extends CompositeCommand {
IslandBaseEvent event = TeamEvent.builder()
.island(getIslands()
.getIsland(getWorld(), playerUUID))
.reason(TeamEvent.Reason.MAKELEADER)
.reason(TeamEvent.Reason.SETOWNER)
.involvedPlayer(targetUUID)
.build();
getPlugin().getServer().getPluginManager().callEvent(event);

View File

@ -21,7 +21,7 @@ public class TeamEvent {
REJECT,
LEAVE,
KICK,
MAKELEADER,
SETOWNER,
INFO,
DELETE,
UNKNOWN,
@ -63,13 +63,13 @@ public class TeamEvent {
}
}
/**
* Event fires before a make leader is performed on an island.
* To get the old owner, get from the island object. The new leader is the player's UUID.
* Event fires before a setowner is performed on an island.
* To get the old owner, get from the island object. The new owner is the player's UUID.
* @author tastybento
*
*/
public static class TeamMakeLeaderEvent extends IslandBaseEvent {
private TeamMakeLeaderEvent(Island island, UUID player, boolean admin, Location location) {
public static class TeamSetOwnerEvent extends IslandBaseEvent {
private TeamSetOwnerEvent(Island island, UUID player, boolean admin, Location location) {
// Final variables have to be declared in the constructor
super(island, player, admin, location);
}
@ -170,8 +170,8 @@ public class TeamEvent {
return new TeamRejectEvent(island, player, admin, location);
case KICK:
return new TeamKickEvent(island, player, admin, location);
case MAKELEADER:
return new TeamMakeLeaderEvent(island, player, admin, location);
case SETOWNER:
return new TeamSetOwnerEvent(island, player, admin, location);
case INFO:
return new TeamInfoEvent(island, player, admin, location);
case DELETE: