Fixed antipoison not working in some scenarios
Added new ::timers admin command
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package content.data.consumables.effects
|
||||
|
||||
import core.api.registerTimer
|
||||
import core.api.removeTimer
|
||||
import core.api.spawnTimer
|
||||
import core.game.consumable.ConsumableEffect
|
||||
import core.game.node.entity.player.Player
|
||||
|
||||
class AddTimerEffect (val identifier: String, vararg val args: Any) : ConsumableEffect() {
|
||||
override fun activate (p: Player) {
|
||||
removeTimer (p, identifier)
|
||||
val timer = spawnTimer (identifier, *args) ?: return
|
||||
registerTimer (p, timer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user