2024-05-05 18:00:54 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
|
|
|
Date: Fri, 3 May 2024 22:56:12 +0200
|
|
|
|
Subject: [PATCH] Add missing wind charge damage type
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/damage/DamageType.java b/src/main/java/org/bukkit/damage/DamageType.java
|
2024-06-13 17:45:43 +02:00
|
|
|
index 69abda41ef3a1d8948982d16b193a9a565fafa38..5e332d7def0ef346c7d55018f18b3136e69deb3f 100644
|
2024-05-05 18:00:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/damage/DamageType.java
|
|
|
|
+++ b/src/main/java/org/bukkit/damage/DamageType.java
|
2024-06-13 17:45:43 +02:00
|
|
|
@@ -66,6 +66,12 @@ public interface DamageType extends Keyed, Translatable {
|
2024-05-05 18:00:54 +02:00
|
|
|
public static final DamageType BAD_RESPAWN_POINT = getDamageType("bad_respawn_point");
|
|
|
|
public static final DamageType OUTSIDE_BORDER = getDamageType("outside_border");
|
|
|
|
public static final DamageType GENERIC_KILL = getDamageType("generic_kill");
|
|
|
|
+ // Paper start
|
|
|
|
+ @org.bukkit.MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.UPDATE_1_21)
|
|
|
|
+ @ApiStatus.Experimental
|
|
|
|
+ @org.jetbrains.annotations.Nullable
|
|
|
|
+ DamageType WIND_CHARGE = getExperimentalDamageType("wind_charge");
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
private static DamageType getDamageType(@NotNull String key) {
|
2024-06-13 17:45:43 +02:00
|
|
|
@@ -73,6 +79,12 @@ public interface DamageType extends Keyed, Translatable {
|
2024-05-05 18:00:54 +02:00
|
|
|
return Preconditions.checkNotNull(Registry.DAMAGE_TYPE.get(namespacedKey), "No DamageType found for %s. This is a bug.", namespacedKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ private static @org.jetbrains.annotations.Nullable DamageType getExperimentalDamageType(@NotNull String key) {
|
|
|
|
+ return Registry.DAMAGE_TYPE.get(NamespacedKey.minecraft(key));
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
* <p>
|