blob: 26cbd83b185dfa5e18cd1cfde2060586ca8efb2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Axionize <154778082+Axionize@users.noreply.github.com>
Date: Wed, 25 Sep 2024 04:43:26 -0400
Subject: [PATCH] Void damage configuration API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index adcd8161846b06fd1a7895750f98b629204a8406..ef32a937e6faf1e8a5d6b1207986715bae5a246c 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -52,6 +52,54 @@ import org.jetbrains.annotations.Nullable;
*/
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper
+ // Paper start - void damage configuration
+ /**
+ * Checks if void damage is enabled on this world.
+ *
+ * @return true if enabled
+ */
+ boolean isVoidDamageEnabled();
+
+ /**
+ * Sets whether void damage is enabled on this world.
+ *
+ * @param enabled true to enable void damage
+ */
+ void setVoidDamageEnabled(boolean enabled);
+
+ /**
+ * Gets the damage applied to the player when they are in the void in this world.
+ * Check {@link #isVoidDamageEnabled()} to see if void damage is enabled.
+ *
+ * @return amount of damage to apply
+ * @see #isVoidDamageEnabled()
+ */
+ float getVoidDamageAmount();
+
+ /**
+ * Sets the damage applied to the player when they are in the void in this world.
+ * Check {@link #isVoidDamageEnabled()} to see if void damage is enabled.
+ *
+ * @param voidDamageAmount amount of damage to apply
+ */
+ void setVoidDamageAmount(float voidDamageAmount);
+
+ /**
+ * Gets the offset applied to {@link #getMinHeight()} to determine the height at which void damage starts to apply.
+ *
+ * @return offset from min build height
+ * @see #isVoidDamageEnabled()
+ */
+ double getVoidDamageMinBuildHeightOffset();
+
+ /**
+ * Sets the offset applied to {@link #getMinHeight()} to determine the height at which void damage starts to apply.
+ *
+ * @param minBuildHeightOffset offset from min build height
+ */
+ void setVoidDamageMinBuildHeightOffset(double minBuildHeightOffset);
+ // Paper end - void damage configuration
+
// Paper start
/**
* @return The amount of Entities in this world
|