Delaying chunk unloading / entity deactivation

Discussion in 'Spigot Discussion' started by takatalvi, Oct 19, 2018.

  1. Hi, I'm sure this is a common issue, that has been taken as a reality, a fact that somehow cannot be changed. But I believe there are ways, although I'm not sure if it can be changed by Spigot, or it's unchangeable because of vanilla.

    The issue: When a player teleports to a distant location and there is no other player in his original location, the entities there are deactivated instantly. This prevents players to teleport with their pets following, as the pets are deactivated before they could teleport.

    Delaying entity deactivation (or chunk unloading, I think) could help this. In vanilla survival, the player usually doesn't teleport, so there is no need for this, but I understand a majority of servers have some kind of teleportation available for players.

    Is there a known way to implement this? I wasn't able to find anything on this forum. Thanks!
  2. md_5

    Administrator Developer

    By pets do you mean wolves/ocelots tamed manually, or plugin pets?
  3. I mean natural pets - ocelots, wolves, parrots. I'm not exactly sure what's on the back end, but from the front end, it seems that a delay could solve this. Currently, my players are aware of how it works, so usually they ask for someone to stay in the location when they teleport away, so there's someone keeping the chunk and entities loaded. When the player is alone, however, the pets don't follow.