File tree Expand file tree Collapse file tree
src/main/java/com/fibermc/essentialcommands/playerdata Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -399,17 +399,11 @@ public boolean isSleepingFromCommand() {
399399 return isSleepingFromCommand ;
400400 }
401401
402- public void setIsSleepingFromCommand (boolean isStartingSleeping ) {
403- if (this .isSleepingFromCommand == isStartingSleeping ) {
404- return ;
405- }
406- if (isStartingSleeping ) {
402+ public void setIsSleepingFromCommand (boolean sleepingFromCommand ) {
403+ this .isSleepingFromCommand = sleepingFromCommand ;
404+ if (CONFIG .SLEEP_INVULN && sleepingFromCommand ) {
407405 Pal .grantAbility (player , VanillaAbilities .INVULNERABLE , ECAbilitySources .SLEEP_INVULN );
408- } else {
409- // ending sleeping
410- Pal .revokeAbility (player , VanillaAbilities .INVULNERABLE , ECAbilitySources .SLEEP_INVULN );
411406 }
412- this .isSleepingFromCommand = isStartingSleeping ;
413407 }
414408
415409 public void setPreviousLocation (MinecraftLocation location ) {
You can’t perform that action at this time.
0 commit comments