Skip to content

Commit 35bcdf0

Browse files
committed
Reset player invulnerable on tick thread
1 parent 3c5b438 commit 35bcdf0

File tree

1 file changed

+3
-1
lines changed
  • bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/module/essentialcommands

1 file changed

+3
-1
lines changed

bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/module/essentialcommands/Invulnerable.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ object Invulnerable : PlayerOptionalCommand<Invulnerable.Config, Invulnerable.La
3333
Listeners.unregister()
3434
if (config.autoResetInvulnerable) {
3535
for (player in changed) {
36-
player.isInvulnerable = false
36+
player.syncTick {
37+
player.isInvulnerable = false
38+
}
3739
}
3840
}
3941
changed.clear()

0 commit comments

Comments
 (0)