Persist all entities that have been leashed.

This commit is contained in:
Logan Gorence committed 2022-01-24 17:22:46 -08:00
1 parent d4a06ea84a
commit 66ee0ba701
1 file changed
+4 -2
@@ -69,8 +69,10 @@ class GameplayFeature : Feature() {
// Something to do with Bukkit, leashes must happen after the event.
Bukkit.getScheduler().runTask(plugin) { ->
// If the entity is already leashed, don't do anything.
if (livingEntity.isLeashed
) return@runTask
if (livingEntity.isLeashed) return@runTask
// Interacted with the entity, don't despawn it.
livingEntity.removeWhenFarAway = false
val leashSuccess = livingEntity.setLeashHolder(event.player)