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

Paper Changes:
PaperMC/Paper@b9b4c9a Deprecate duplicate API for arrow stuck count (#8829)
PaperMC/Paper@57f1157 Updated Upstream (Bukkit/CraftBukkit) (#8823)
2023-02-08 20:24:09 -08: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 aa04d7df70d99402c91e920fd693d7d4fb655786..bb249f7d54fd90d63f609eedf0bbb463f1aa96f1 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
+
/**
* Represents various map environment types that a world may be
*/