Files
Purpur/patches/api/0041-Add-local-difficulty-api.patch
2023-12-25 20:15:34 -08: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 d3081d4445af73c2c7b23c5fc60861f184ac808e..1173081896ca95ab001175ddf6e269ab5e791896 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4174,6 +4174,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.
*