From bf27bced3eb24976f485c9cdd422d5d52edfadce Mon Sep 17 00:00:00 2001 From: Shynixn Date: Sat, 18 Jan 2025 18:13:25 +0100 Subject: [PATCH] #603 Fixed ball concurrent modifications. --- build.gradle.kts | 2 +- .../shynixn/blockball/impl/service/SoccerBallFactoryImpl.kt | 3 ++- src/main/resources/plugin-legacy.yml | 2 +- src/main/resources/plugin.yml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 958e7a5de..c031c5b22 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } group = "com.github.shynixn" -version = "7.11.0" +version = "7.11.1" repositories { mavenLocal() diff --git a/src/main/java/com/github/shynixn/blockball/impl/service/SoccerBallFactoryImpl.kt b/src/main/java/com/github/shynixn/blockball/impl/service/SoccerBallFactoryImpl.kt index b7406df79..77cd5f21e 100644 --- a/src/main/java/com/github/shynixn/blockball/impl/service/SoccerBallFactoryImpl.kt +++ b/src/main/java/com/github/shynixn/blockball/impl/service/SoccerBallFactoryImpl.kt @@ -33,7 +33,8 @@ class SoccerBallFactoryImpl ( init { plugin.launch { while (!isDisposed) { - for (ball in ballHitBoxTracked.values) { + val balls = ballHitBoxTracked.values.toTypedArray() + for (ball in balls) { ball.run() } delay(1.ticks) diff --git a/src/main/resources/plugin-legacy.yml b/src/main/resources/plugin-legacy.yml index 518df988c..ed2089767 100644 --- a/src/main/resources/plugin-legacy.yml +++ b/src/main/resources/plugin-legacy.yml @@ -1,5 +1,5 @@ name: BlockBall -version: 7.11.0 +version: 7.11.1 author: Shynixn website: https://www.spigotmc.org/members/shynixn.63455/ main: com.github.shynixn.blockball.BlockBallPlugin diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index ed993c1ac..a87a0fa22 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: BlockBall -version: 7.11.0 +version: 7.11.1 author: Shynixn website: https://www.spigotmc.org/members/shynixn.63455/ main: com.github.shynixn.blockball.BlockBallPlugin