deprecate our ItemRarity API
This commit is contained in:
parent
6a4974b1b9
commit
c38f96b0e5
540 changed files with 210 additions and 252 deletions
24
patches/server/0533-Add-PlayerDeepSleepEvent.patch
Normal file
24
patches/server/0533-Add-PlayerDeepSleepEvent.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Wed, 21 Apr 2021 15:58:19 -0700
|
||||
Subject: [PATCH] Add PlayerDeepSleepEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index ecae1708feee507df1440ad2822e7af8c3c278de..1f4351c1701465a3b5dfcb8d61aa5035956bbd42 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -260,6 +260,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (this.isSleeping()) {
|
||||
++this.sleepCounter;
|
||||
+ // Paper start - Add PlayerDeepSleepEvent
|
||||
+ if (this.sleepCounter == SLEEP_DURATION) {
|
||||
+ if (!new io.papermc.paper.event.player.PlayerDeepSleepEvent((org.bukkit.entity.Player) getBukkitEntity()).callEvent()) {
|
||||
+ this.sleepCounter = Integer.MIN_VALUE;
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - Add PlayerDeepSleepEvent
|
||||
if (this.sleepCounter > 100) {
|
||||
this.sleepCounter = 100;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue