Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@40adc23 Fix incorrect javadoc in JarLibrary (#9513) PaperMC/Paper@c016e03 Fix unbreakable flint and steel consumed when igniting creepers (#9509) PaperMC/Paper@b1334b5 Mark Player.sendSignChange as deprecated (#9382) PaperMC/Paper@2f8d9db Pathfinder hasPath should check if path is done. (#9231) PaperMC/Paper@46a36d3 Make ExperienceOrb entities call EntitySpawnEvent (#9197) PaperMC/Paper@24d690f Fix hopper not marking source inv as changed (#9070) PaperMC/Paper@383f0ed Remove sign ticking (#9478) PaperMC/Paper@d8b8f61 Configurable Region Compression Format (#8505) PaperMC/Paper@2c54b39 Don't support hex in book title and author (#9493) PaperMC/Paper@e19177a Rewrote Amethyst logic to throw both BlockGrowEvent and BlockSpreadEvent (#9217) PaperMC/Paper@4283054 Add player whitelist events (#9209) PaperMC/Paper@aa93dcf feat: add minimessage tag resolvers overload to CommandSender#sendMessage (#9505) PaperMC/Paper@b14979e Remove isRemoved skip on .discard() (#9520) PaperMC/Paper@1837f6c Prevent entity removals if the entity slices is receiving status updates PaperMC/Paper@a40e48f Add cause to PlayerOpenSignEvent (#9441) PaperMC/Paper@7d1cc6d Add Translatable interface to MusicInstrument (#9538) PaperMC/Paper@6c7e3c5 Clarify viewers set mutability in chat events (#9525) PaperMC/Paper@f402f89 Bump net.kyori.ansi to 1.0.2 (#9546) PaperMC/Paper@81619a6 Fix treasure map config default (#9572) PaperMC/Paper@13c9d3c Bump net.kyori:ansi to 1.0.3 (#9575) PaperMC/Paper@2c55dd8 Expand use of strict advancement dim check (#9545) PaperMC/Paper@69a8013 Fix inventorycloseevent javadocs (#9533) PaperMC/Paper@2fa8efc Updated Upstream (Bukkit/CraftBukkit) (#9485) PaperMC/Paper@508a295 Only erase allay memory on non-item targets (#9570) PaperMC/Paper@31358d5 API for updating recipes on clients (#6463) PaperMC/Paper@8fe8ca6 Add clickable version on version command (#9347) PaperMC/Paper@d6d2b6f Only capture actual tree growth (#6464)
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Blast-MC <cjblanton2@gmail.com>
|
|
Date: Sun, 24 Jul 2022 19:36:37 -0400
|
|
Subject: [PATCH] Expanded Insomnia API methods
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 4390fa4cc4616a13855d38cb5e09d60153368428..924dc2c48b77c5c74c6058c661699efeaf72a40d 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -61,6 +61,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
*/
|
|
@Override
|
|
@NotNull Player getPlayer();
|
|
+
|
|
+ /**
|
|
+ * Checks if the player will spawn phantoms at night
|
|
+ * Uses time since last rest statistic
|
|
+ *
|
|
+ * {@link #getTimeSinceLastRest()}
|
|
+ *
|
|
+ * @return if the player will spawn phantoms at night
|
|
+ */
|
|
+ boolean isInsomniac();
|
|
+
|
|
+ /**
|
|
+ * Sets if the player bypasses phantom spawning if insomniac
|
|
+ *
|
|
+ * @param val
|
|
+ */
|
|
+ void setBypassInsomnia(boolean val);
|
|
+
|
|
+ /**
|
|
+ * Does the player bypass phantom spawning if insomniac
|
|
+ *
|
|
+ * @return if the player bypasses phantom spawning
|
|
+ */
|
|
+ boolean doesBypassInsomnia();
|
|
+
|
|
+ /**
|
|
+ * Set the time since last rest stat for the player
|
|
+ * This modifies the phantom spawning timer
|
|
+ *
|
|
+ * @param ticks how long since last rest, greater than or equal to 1
|
|
+ */
|
|
+ void setTimeSinceLastRest(int ticks);
|
|
+
|
|
+ /**
|
|
+ * Gets the time since the player last slept
|
|
+ *
|
|
+ * @return ticks since the player last slept
|
|
+ */
|
|
+ int getTimeSinceLastRest();
|
|
// Parchment end
|
|
|
|
// Paper start
|