mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
21 lines
848 B
Diff
21 lines
848 B
Diff
|
--- a/net/minecraft/server/players/SleepStatus.java
|
||
|
+++ b/net/minecraft/server/players/SleepStatus.java
|
||
|
@@ -18,7 +18,7 @@
|
||
|
}
|
||
|
|
||
|
public boolean a(int i, List<EntityPlayer> list) {
|
||
|
- int j = (int) list.stream().filter(EntityHuman::isDeeplySleeping).count();
|
||
|
+ int j = (int) list.stream().filter((eh) -> { return eh.isDeeplySleeping() || eh.fauxSleeping; }).count(); // CraftBukkit
|
||
|
|
||
|
return j >= this.b(i);
|
||
|
}
|
||
|
@@ -46,7 +46,7 @@
|
||
|
while (iterator.hasNext()) {
|
||
|
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||
|
|
||
|
- if (!entityplayer.isSpectator()) {
|
||
|
+ if (!entityplayer.isSpectator() && !entityplayer.fauxSleeping) { // CraftBukkit
|
||
|
++this.activePlayers;
|
||
|
if (entityplayer.isSleeping()) {
|
||
|
++this.sleepingPlayers;
|