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

Paper Changes:
PaperMC/Paper@3fd1502 Add missing deprecation (#8886)
PaperMC/Paper@773dd72 Updated Upstream (Bukkit/CraftBukkit) (#9739)
2023-09-22 19:33:54 -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 b8b97df069b28fa3cf32f1ad1f01f586a0cfbc78..aa60e6db5705764c8b9e766460c692260a2e8fb3 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4008,6 +4008,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.
*