Skip to content

Commit

Permalink
feat(forge16): add return teleport position
Browse files Browse the repository at this point in the history
  • Loading branch information
danorris709 committed Nov 6, 2022
1 parent aa44616 commit 5905e19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public class BattleTowerConfig extends AbstractYamlConfig {
"one", new TeamPossibilities()
);

private ConfigLocation returnPosition = new ConfigLocation(
"world", 0, 0, 0, 0, 0
);

private int maxFloor = -1;
private long cooldownSeconds = TimeUnit.DAYS.toSeconds(1);
private boolean allowExpGain = false;
Expand Down Expand Up @@ -98,6 +102,10 @@ public List<String> getAttemptFinishWinCommands() {
return this.attemptFinishWinCommands;
}

public ConfigLocation getReturnPosition() {
return this.returnPosition;
}

@ConfigSerializable
public static class PossiblePosition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ public void finishAttempt() {
this.bestAttempt = attempt;
}

this.getParent().teleport(this.manager.getConfig().getReturnPosition());

this.attemptStart = -1;
this.currentFloor = 0;
}
Expand Down

0 comments on commit 5905e19

Please sign in to comment.