Files
Purpur/patches/api/0048-Add-local-difficulty-api.patch

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 e8c0c853eb52d1473c20231660355f77b1f7e016..3d053490dc87724f57893a553f1ab9cf1a3b73c0 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3985,6 +3985,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
*/