Skip to content
This repository was archived by the owner on Dec 7, 2022. It is now read-only.

Commit 0532902

Browse files
DoguilloPablete1234
authored andcommitted
Fix proximity on completed objectives
1 parent 965ecd2 commit 0532902

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/in/twizmwaz/cardinal/command/ProximityCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private static String getObjective(GameObjective objective, GameObjectiveProximi
8181
if (objective instanceof FlagObjective) message += ((FlagObjective) objective).getChatColor();
8282
message += WordUtils.capitalizeFully(objective.getName().replaceAll("_", " ")) + " ";
8383
message += objective.isComplete() ? ChatColor.GREEN + "COMPLETE " : objective.isTouched() ? ChatColor.YELLOW + "TOUCHED " : ChatColor.RED + "UNTOUCHED ";
84-
if (proximityHandler != null) {
84+
if (proximityHandler != null && !objective.isComplete()) {
8585
message += ChatColor.GRAY + proximityHandler.getProximityName() + ": ";
8686
message += ChatColor.AQUA + proximityHandler.getProximityAsString();
8787
}

src/main/java/in/twizmwaz/cardinal/module/modules/timeLimit/TimeLimit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static int getWinningTeam(TeamModule team1, TeamModule team2, Result resu
9797
List<Double> proximity1 = new ArrayList<Double>(){};
9898
List<Double> proximity2 = new ArrayList<Double>(){};
9999
for (GameObjective obj : GameHandler.getGameHandler().getMatch().getModules().getModules(GameObjective.class)) {
100-
if (obj.isRequired() && obj.isTouched()){
100+
if (obj.isRequired() && !obj.isComplete() && obj.isTouched()){
101101
if (obj instanceof WoolObjective){
102102
if (obj.getTeam().equals(team1)) {
103103
closestCompletion1.add(50);

0 commit comments

Comments
 (0)