Files
Purpur/patches/api/0043-Add-local-difficulty-api.patch
granny 3325421436 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@efd47e3 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9188)
PaperMC/Paper@1edfefd Add option to flush region files on save (#9149)
PaperMC/Paper@9daa019 Added wither vanilla invulnerability API (#9124)
2023-05-12 22:45:44 -07:00

28 lines
1014 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Sat, 9 Jul 2022 00:57:26 -0500
Subject: [PATCH] Add local difficulty api
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 2b45aa9b438d7856ec448c56832b2b2100961565..9b5cd8a33bae463872efecaca0829b7d2b434529 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3973,6 +3973,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public DragonBattle getEnderDragonBattle();
+ // Purpur start
+ /**
+ * Gets the local difficulty (based on inhabited time) at a location
+ *
+ * @param location Location to check
+ * @return The local difficulty
+ */
+ public float getLocalDifficultyAt(@NotNull Location location);
+ // Purpur end
+
/**
* Represents various map environment types that a world may be
*/