Skip to content

Commit

Permalink
Awarding wins for Sandbox PVP
Browse files Browse the repository at this point in the history
  • Loading branch information
buj committed May 25, 2024
1 parent 39db713 commit 802ff99
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/darkdustry/database/models/PlayerData.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class PlayerData {
public int hexedWins = 0;
public int msgoWins = 0;
public int pvpWins = 0;
public int spvpWins = 0;

public Rank rank = Rank.player;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/darkdustry/features/history/History.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void put(Tile tile, HistoryEntry entry) {
var queue = get(other.array());
if (queue == null) return;

if (entry instanceof PreBlockEntry && !queue.isEmpty() && queue.last() instanceof PreBlockEntry) queue.removeLast();
if (entry instanceof PreBlockEntry && !queue.isEmpty() && queue.last() instanceof PreBlockEntry) return;
if (entry instanceof BlockEntry && !queue.isEmpty() && queue.last() instanceof PreBlockEntry) queue.removeLast();

queue.add(entry);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/darkdustry/listeners/PluginEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ else if (data.discordLink)
case hexed -> data.hexedWins++;
case msgo -> data.msgoWins++;
case pvp -> data.pvpWins++;
case sandboxPVP -> data.spvpWins++;
}
});

Expand Down

0 comments on commit 802ff99

Please sign in to comment.