Skip to content

Commit

Permalink
Improved replays
Browse files Browse the repository at this point in the history
  • Loading branch information
Devlrxxh committed Apr 7, 2024
1 parent eb026cf commit 8fe2a4f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/main/java/me/lrxh/practice/match/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,8 @@ public void setupPlayer(Player player) {
PlayerUtil.reset(player);

if (Practice.getInstance().isReplay() && !kit.getGameRules().isBuild()) {
if (profile.isReplay()) {
if (ReplaySaver.exists(profile.getUuid().toString())) {
ReplaySaver.delete(profile.getUuid().toString());
}
} else {
profile.setReplay(true);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/me/lrxh/practice/profile/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public class Profile {
private Cooldown enderpearlCooldown;
private Cooldown voteCooldown;
private boolean silent = false;
private boolean replay = false;

public Profile(UUID uuid) {
this.uuid = uuid;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/me/lrxh/practice/profile/ProfileListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,8 @@ public void onPlayerQuitEvent(PlayerQuitEvent event) {

Profile profile = Profile.getProfiles().get(event.getPlayer().getUniqueId());
if (Practice.getInstance().isReplay()) {
if (profile.isReplay()) {
if (ReplaySaver.exists(profile.getUuid().toString())) {
ReplaySaver.delete(profile.getUuid().toString());
}
}
}

Expand Down

0 comments on commit 8fe2a4f

Please sign in to comment.