Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Set Owner Command calls owner change event too late #1349

Closed
BONNe opened this issue May 9, 2020 · 0 comments
Closed

Admin Set Owner Command calls owner change event too late #1349

BONNe opened this issue May 9, 2020 · 0 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug

Comments

@BONNe
Copy link
Member

BONNe commented May 9, 2020

Description

Describe the bug

By the description of the event and usage in command that is available for users, TeamEvent.Reason.SETOWNER event should be called before the owner is changed. Currently, in admin command, it is called after the owner is assigned.

Expected behavior

Set owner and message about successful assignments should be done after the event.

getIslands().setOwner(getWorld(), user, targetUUID);
user.sendMessage("commands.admin.team.setowner.success", TextVariables.NAME, args.get(0));
// Fire event so add-ons know
Island island = getIslands().getIsland(getWorld(), targetUUID);
// Call the setowner event
TeamEvent.builder()
.island(island)
.reason(TeamEvent.Reason.SETOWNER)
.involvedPlayer(targetUUID)
.admin(true)
.build();

BentoBox Version (Mandatory)
BentoBox 1.13.1 and below

Additional context (Optional)

This comes from the discord support channel, however, the requested bug report was never created.

@Poslovitch Poslovitch added Status: Pending Waiting for a developer to start working on this issue. Type: Bug labels May 9, 2020
@Poslovitch Poslovitch self-assigned this May 9, 2020
@Poslovitch Poslovitch added this to the 1.14.0 - Anniversary Update milestone May 9, 2020
@Poslovitch Poslovitch added Status: In progress Working on the issue. and removed Status: Pending Waiting for a developer to start working on this issue. labels May 13, 2020
@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants