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() IslandBaseEvent event = TeamEvent.builder()
.island(getIslands() .island(getIslands()
.getIsland(getWorld(), playerUUID)) .getIsland(getWorld(), playerUUID))
.reason(TeamEvent.Reason.MAKELEADER) .reason(TeamEvent.Reason.SETOWNER)
.involvedPlayer(targetUUID) .involvedPlayer(targetUUID)
.build(); .build();
getPlugin().getServer().getPluginManager().callEvent(event); getPlugin().getServer().getPluginManager().callEvent(event);

View File

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