How it works
Two mechanisms, deliberately layered:
- Primary — reset the timers. A dolphin dies from two independent countdowns: its air supply (it breathes air, so it drowns if it can't surface) and its moistness (2400 ticks, which drains when it's out of water). Every 2 seconds the plugin refills both on every loaded dolphin, so neither ever reaches zero.
- Safety net — cancel the damage. An
EntityDamageEventlistener cancelsDROWNING,DRYOUT, andSUFFOCATIONfor dolphins, in case a timer slips through between top-ups (e.g. right after a chunk loads).
Plus: dolphins are marked persistent (setRemoveWhenFarAway(false)), because by
default they despawn when no player is nearby — which would otherwise empty your tank
while you're away.
Timers are refreshed on EntityAddToWorldEvent too, which fires on both spawn and
chunk load, so a dolphin in an unloaded aquarium is fine the moment it loads back in.
Партнёрский материал
Сервер для плагина Dolphin Care - как у профи
Плагин Dolphin Care создан для серверов: на своём сервере вы настраиваете его под себя и решаете, кому играть. Создать сервер с плагином Dolphin Care для друзей можно за пару минут - BungeeHost всё уже подготовил.
Часто задаваемые вопросы
Создатели
Детали
Лицензия:
Опубликован:2 месяца назад
Обновлён:2 месяца назад

