Skip to content

Commit 2dc02be

Browse files
committed
fix food in lobby
1 parent ef91cdd commit 2dc02be

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/kotlin/li/angu/challengeplugin/managers/LobbyManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class LobbyManager(private val plugin: ChallengePluginPlugin) {
125125
player.exp = 0f
126126
player.health = 20.0
127127
player.foodLevel = 20
128-
player.saturation = 20f
129-
128+
player.saturation = 0f
129+
130130
// Remove any active potion effects
131131
player.activePotionEffects.forEach { effect ->
132132
player.removePotionEffect(effect.type)

src/main/kotlin/li/angu/challengeplugin/managers/WorldPreparationManager.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,26 +193,26 @@ class WorldPreparationManager(private val plugin: ChallengePluginPlugin) {
193193
future: CompletableFuture<Boolean>
194194
) {
195195
val chunkyAPI = Bukkit.getServicesManager().load(ChunkyAPI::class.java)
196-
196+
197197
if (chunkyAPI == null) {
198198
plugin.logger.warning("Chunky API not available, skipping chunk pregeneration")
199199
finalizeWorldPreparation(world, netherWorld, endWorld, worldName, netherName, endName, future)
200200
return
201201
}
202202

203203
plugin.logger.info("Starting chunk pregeneration for world set: $worldName")
204-
204+
205205
var completedWorlds = 0
206206
val totalWorlds = 3
207-
207+
208208
val onWorldCompleted = {
209209
completedWorlds++
210210
if (completedWorlds >= totalWorlds) {
211211
plugin.logger.info("Chunk pregeneration completed for all worlds in set: $worldName")
212212
finalizeWorldPreparation(world, netherWorld, endWorld, worldName, netherName, endName, future)
213213
}
214214
}
215-
215+
216216
chunkyAPI.onGenerationComplete { event ->
217217
when (event.world()) {
218218
worldName, netherName, endName -> {
@@ -221,12 +221,12 @@ class WorldPreparationManager(private val plugin: ChallengePluginPlugin) {
221221
}
222222
}
223223
}
224-
224+
225225
// Start chunk generation for overworld (1000x1000 = 500 radius)
226226
if (!chunkyAPI.startTask(worldName, "square", 0.0, 0.0, 500.0, 500.0, "concentric")) {
227227
plugin.logger.warning("Failed to start chunk pregeneration for $worldName")
228228
}
229-
229+
230230
// Start chunk generation for nether
231231
if (netherWorld != null) {
232232
if (!chunkyAPI.startTask(netherName, "square", 0.0, 0.0, 500.0, 500.0, "concentric")) {
@@ -236,7 +236,7 @@ class WorldPreparationManager(private val plugin: ChallengePluginPlugin) {
236236
plugin.logger.warning("Cannot prepare chunks for nether. Nether not found.")
237237
onWorldCompleted()
238238
}
239-
239+
240240
// Start chunk generation for end
241241
if (endWorld != null) {
242242
if (!chunkyAPI.startTask(endName, "square", 0.0, 0.0, 500.0, 500.0, "concentric")) {

0 commit comments

Comments
 (0)