diff --git a/plugin/dependency-reduced-pom.xml b/plugin/dependency-reduced-pom.xml
index 511d573b0..de3186363 100644
--- a/plugin/dependency-reduced-pom.xml
+++ b/plugin/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
com.craftmend.openaudiomc
OpenAudioMc
OpenAudioMc
- 6.3.7
+ 6.3.7.2
The OpenAudioMc Java plugin and Api
https://craftmend.com/
diff --git a/plugin/pom.xml b/plugin/pom.xml
index 679333a05..20ec9d0fd 100644
--- a/plugin/pom.xml
+++ b/plugin/pom.xml
@@ -6,7 +6,7 @@
com.craftmend.openaudiomc
OpenAudioMc
- 6.3.7
+ 6.3.7.2
jar
OpenAudioMc
diff --git a/plugin/protocol/static-resources/project_status.json b/plugin/protocol/static-resources/project_status.json
index 6c9bf297f..9636b4d8b 100644
--- a/plugin/protocol/static-resources/project_status.json
+++ b/plugin/protocol/static-resources/project_status.json
@@ -1,6 +1,6 @@
{
"versioning": {
- "version_tag": "6.3.7",
+ "version_tag": "6.3.7.2",
"version_importance": "&2Highly recommended",
"version_update_message": "This update contains some important bug fixes, api methods and nice extra features."
},
diff --git a/plugin/src/main/java/com/craftmend/openaudiomc/generic/utils/HeatMap.java b/plugin/src/main/java/com/craftmend/openaudiomc/generic/utils/HeatMap.java
index 28561d049..eaa892c3a 100644
--- a/plugin/src/main/java/com/craftmend/openaudiomc/generic/utils/HeatMap.java
+++ b/plugin/src/main/java/com/craftmend/openaudiomc/generic/utils/HeatMap.java
@@ -55,21 +55,28 @@ public List getTop(int count) {
public void clean() {
int elements = 0;
+ List removals = new ArrayList<>();
for (Value value : sortedValues()) {
if (value.getAge() > maxAgeInSeconds) {
- data.remove(value.getValue());
+ removals.add(value.getValue());
continue;
}
elements++;
if (elements > maxElements) {
- data.remove(value.getValue());
+ removals.add(value.getValue());
}
}
+
+ for (T removal : removals) {
+ data.remove(removal);
+ }
}
private List sortedValues() {
- return data.values()
+ if (data.isEmpty()) return new ArrayList<>();
+
+ return new ArrayList<>(data.values())
.stream()
.sorted(
Comparator
diff --git a/plugin/src/main/resources/bungee.yml b/plugin/src/main/resources/bungee.yml
index 3f0f98b3f..71a1c1d78 100644
--- a/plugin/src/main/resources/bungee.yml
+++ b/plugin/src/main/resources/bungee.yml
@@ -1,5 +1,5 @@
name: OpenAudioMc
-version: 6.3.7
+version: 6.3.7.2
main: com.craftmend.openaudiomc.bungee.OpenAudioMcBungee
author: Mindgamesnl
authors: [Mindgamesnl]
diff --git a/plugin/src/main/resources/plugin.yml b/plugin/src/main/resources/plugin.yml
index 409821110..fe12f2283 100644
--- a/plugin/src/main/resources/plugin.yml
+++ b/plugin/src/main/resources/plugin.yml
@@ -1,5 +1,5 @@
name: OpenAudioMc
-version: 6.3.7
+version: 6.3.7.2
softdepend: [WorldGuard, Train_Carts]
main: com.craftmend.openaudiomc.spigot.OpenAudioMcSpigot
api-version: 1.13