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

Paper Changes:
PaperMC/Paper@06fdc02 [ci skip] Correct upstream/paper javadoc (#8286)
PaperMC/Paper@11ab383 Don't use plugin-profiling to enable timings
2023-03-31 00:12:09 -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 6716a1185e733f3ddf56b295f3153938f57d4229..b19264c7584441422b85c7a68d857f2bd314f140 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4007,6 +4007,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
*/