mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-04 23:48:27 +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.
|
// minecraft will not update it.
|
||||||
boolean removeFromPlayerList = Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean();
|
boolean removeFromPlayerList = Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean();
|
||||||
NMS.addOrRemoveFromPlayerList(getBukkitEntity(),
|
NMS.addOrRemoveFromPlayerList(getBukkitEntity(),
|
||||||
removeFromPlayerList || data().get("removefromplayerlist", removeFromPlayerList));
|
data().get("removefromplayerlist", removeFromPlayerList));
|
||||||
}
|
}
|
||||||
}, 5);
|
}, 5);
|
||||||
handle.getBukkitEntity().setSleepingIgnored(true);
|
handle.getBukkitEntity().setSleepingIgnored(true);
|
||||||
|
@ -51,10 +51,11 @@ public class NMS {
|
|||||||
EntityLiving handle = ((CraftLivingEntity) bukkitEntity).getHandle();
|
EntityLiving handle = ((CraftLivingEntity) bukkitEntity).getHandle();
|
||||||
if (handle.world == null)
|
if (handle.world == null)
|
||||||
return;
|
return;
|
||||||
if (remove)
|
if (remove) {
|
||||||
handle.world.players.remove(handle);
|
handle.world.players.remove(handle);
|
||||||
else
|
} else {
|
||||||
handle.world.players.add(handle);
|
handle.world.players.add(handle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void attack(EntityLiving handle, EntityLiving target) {
|
public static void attack(EntityLiving handle, EntityLiving target) {
|
||||||
|
Loading…
Reference in New Issue
Block a user