Merge if statement

This commit is contained in:
tastybento 2024-04-04 09:11:49 -07:00
parent 24b7d26fbe
commit 1c19703f44
1 changed files with 3 additions and 4 deletions

View File

@ -185,11 +185,10 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
Util.runCommands(user, ownerName, getIWM().getOnJoinCommands(getWorld()), "join");
});
if (getIWM().getWorldSettings(getWorld()).isDisallowTeamMemberIslands()) {
if (getIWM().getWorldSettings(getWorld()).isDisallowTeamMemberIslands()
&& getIWM().isTeamJoinDeathReset(getWorld())) {
// Reset deaths
if (getIWM().isTeamJoinDeathReset(getWorld())) {
getPlayers().setDeaths(getWorld(), user.getUniqueId(), 0);
}
getPlayers().setDeaths(getWorld(), user.getUniqueId(), 0);
}
user.sendMessage("commands.island.team.invite.accept.you-joined-island", TextVariables.LABEL, getTopLabel());
User inviter = User.getInstance(invite.getInviter());