mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 07:22:20 +00:00
RoleFollowers will not despawn if they have an owner
RoleFollowers canDespawn field will be changed back to the value set by the player in the gui/api if they stop following a player
This commit is contained in:
1 parent
6698e8619c
commit
77ee403720
4 files changed
+9
-2
No files matched your search
@@ -104,6 +104,7 @@ public class RoleFollower extends RoleInterface{
|
||||
daysHired = 0;
|
||||
hiredTime = 0;
|
||||
isFollowing = true;
|
||||
npc.stats.canDespawn = npc.stats.playerSetCanDespawn;
|
||||
}
|
||||
|
||||
public int getDaysLeft(){
|
||||
@@ -150,6 +151,7 @@ public class RoleFollower extends RoleInterface{
|
||||
if(ownerUUID == null || id == null || !ownerUUID.equals(id))
|
||||
killed();
|
||||
ownerUUID = id.toString();
|
||||
npc.stats.canDespawn = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user