-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport some stuff from the generators branch (#10365)
- Loading branch information
1 parent
182e79b
commit acf838f
Showing
7 changed files
with
80 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,13 @@ Co-authored-by: Yannick Lamprecht <[email protected]> | |
|
||
diff --git a/src/main/java/io/papermc/paper/potion/SuspiciousEffectEntry.java b/src/main/java/io/papermc/paper/potion/SuspiciousEffectEntry.java | ||
new file mode 100644 | ||
index 0000000000000000000000000000000000000000..c8446678e39e777bd2c9992d5c577f4c7606ce15 | ||
index 0000000000000000000000000000000000000000..6a96e339ff1466df5743b5d42a31ce6a67e48f16 | ||
--- /dev/null | ||
+++ b/src/main/java/io/papermc/paper/potion/SuspiciousEffectEntry.java | ||
@@ -0,0 +1,37 @@ | ||
@@ -0,0 +1,38 @@ | ||
+package io.papermc.paper.potion; | ||
+ | ||
+import org.bukkit.potion.PotionEffect; | ||
+import org.bukkit.potion.PotionEffectType; | ||
+import org.jetbrains.annotations.Contract; | ||
+import org.jetbrains.annotations.NotNull; | ||
|
@@ -31,24 +32,24 @@ index 0000000000000000000000000000000000000000..c8446678e39e777bd2c9992d5c577f4c | |
+public sealed interface SuspiciousEffectEntry permits SuspiciousEffectEntryImpl { | ||
+ | ||
+ /** | ||
+ * Gets the effect type. | ||
+ * Gets the effect type. | ||
+ * | ||
+ * @return type | ||
+ */ | ||
+ * @return effect type | ||
+ */ | ||
+ @NotNull PotionEffectType effect(); | ||
+ | ||
+ /** | ||
+ * Gets the duration for this effect instance. | ||
+ * | ||
+ * @return duration (in ticks) | ||
+ */ | ||
+ * Gets the duration for this effect instance. | ||
+ * | ||
+ * @return duration (in ticks) or {@link PotionEffect#INFINITE_DURATION} | ||
+ */ | ||
+ int duration(); | ||
+ | ||
+ /** | ||
+ * Creates a new instance of SuspiciousEffectEntry. | ||
+ * | ||
+ * @param effectType effect type | ||
+ * @param duration duration (in ticks) | ||
+ * @param duration duration (in ticks) or {@link PotionEffect#INFINITE_DURATION} | ||
+ * @return new instance of an entry | ||
+ */ | ||
+ @Contract(value = "_, _ -> new", pure = true) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters