mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-02 14:38:19 +01:00
Use setting more consistently
This commit is contained in:
parent
bb36e8ea27
commit
0ba4270a40
@ -39,7 +39,7 @@ public class CitizensHumanNPC extends CitizensNPC implements Equipable {
|
||||
// minecraft will not update it.
|
||||
boolean removeFromPlayerList = Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean();
|
||||
NMS.addOrRemoveFromPlayerList(getBukkitEntity(),
|
||||
removeFromPlayerList || data().get("removefromplayerlist", removeFromPlayerList));
|
||||
data().get("removefromplayerlist", removeFromPlayerList));
|
||||
}
|
||||
}, 5);
|
||||
handle.getBukkitEntity().setSleepingIgnored(true);
|
||||
|
@ -51,10 +51,11 @@ public class NMS {
|
||||
EntityLiving handle = ((CraftLivingEntity) bukkitEntity).getHandle();
|
||||
if (handle.world == null)
|
||||
return;
|
||||
if (remove)
|
||||
if (remove) {
|
||||
handle.world.players.remove(handle);
|
||||
else
|
||||
} else {
|
||||
handle.world.players.add(handle);
|
||||
}
|
||||
}
|
||||
|
||||
public static void attack(EntityLiving handle, EntityLiving target) {
|
||||
|
Loading…
Reference in New Issue
Block a user