Skip to content

Commit

Permalink
Allow removal from cooldown handler
Browse files Browse the repository at this point in the history
  • Loading branch information
TealNerd committed Jan 4, 2018
1 parent 11d8e04 commit 9b5afd1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>vg.civcraft.mc.civmodcore</groupId>
<artifactId>CivModCore</artifactId>
<version>1.6.1</version>
<version>1.6.2</version>

<name>CivModCore</name>
<url>https://github.com/DevotedMC/CivModCore/</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ public interface ICoolDownHandler<E> {
*/
long getTotalCoolDown();

/**
* Removed the cooldown for the given object
*
* @param e
* Object to check
*/
void removeCooldown(E e);
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@ public long getRemainingCoolDown(E e) {
public long getTotalCoolDown() {
return cooldown;
}

@Override
public void removeCooldown(E e) {
cds.remove(e);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,10 @@ public long getRemainingCoolDown(E e) {
public long getTotalCoolDown() {
return cooldown;
}

@Override
public void removeCooldown(E e) {
cds.remove(e);
}

}

0 comments on commit 9b5afd1

Please sign in to comment.