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

Paper Changes:
PaperMC/Paper@f613437 Fix CraftPlayerProfile#setId regression (#9822)
PaperMC/Paper@3e9d2ac Don't call options events on login (#9834)
PaperMC/Paper@e4d184f Replace bukkit Consumers with java consumers (#9836)
PaperMC/Paper@3e1c5e3 Add BlockData setter for FallingBlock (#9829)
PaperMC/Paper@852c1c2 Add additional tags to ItemMeta obfuscation filtering (#9665)
2023-10-14 18:33:56 -07:00

28 lines
1003 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 8d861f5522a33669f67b3e41dfbc5234637114b4..d12443e6e1f71354dcfab9cf2f166a1097b589b5 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4010,6 +4010,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
+
/**
* Get all {@link FeatureFlag} enabled in this world.
*