-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Bukkit recipe iterator warm-up code to BukkitFcRecipeProvider_1_13
- Loading branch information
1 parent
11757cc
commit c0a27ca
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...3/src/main/kotlin/net/benwoodworth/fastcraft/bukkit/recipe/BukkitFcRecipeProvider_1_13.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.benwoodworth.fastcraft.bukkit.recipe | ||
|
||
import net.benwoodworth.fastcraft.bukkit.util.BukkitVersion | ||
import org.bukkit.Server | ||
import org.bukkit.plugin.Plugin | ||
import javax.inject.Inject | ||
import javax.inject.Singleton | ||
|
||
@Singleton | ||
open class BukkitFcRecipeProvider_1_13 @Inject constructor( | ||
plugin: Plugin, | ||
bukkitVersion: BukkitVersion, | ||
private val server: Server, | ||
recipeFactory: BukkitFcCraftingRecipe.Factory, | ||
) : BukkitFcRecipeProvider_1_7( | ||
plugin = plugin, | ||
bukkitVersion = bukkitVersion, | ||
server = server, | ||
recipeFactory = recipeFactory | ||
) { | ||
init { | ||
warmUpRecipeIterator() | ||
} | ||
|
||
private fun warmUpRecipeIterator() { | ||
server.recipeIterator().forEach { _ -> } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters