Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
remove PotionEffect color API as it was removed upstream
appears that value was never even used anyways
Dieser Commit ist enthalten in:
Ursprung
177ec197a7
Commit
7fe0b31e5f
@ -1,38 +1,35 @@
|
|||||||
From fa0d7b6333526b569fbbcb238d570f0ae7949651 Mon Sep 17 00:00:00 2001
|
From 18997534f496e4e8c96f06b8632f4605bc513711 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 3 Jun 2018 04:10:13 -0400
|
Date: Sun, 3 Jun 2018 04:10:13 -0400
|
||||||
Subject: [PATCH] PotionEffect clone methods
|
Subject: [PATCH] PotionEffect clone methods
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||||
index 86616f1b8..35984ef6c 100644
|
index 86616f1b8..efb55d29c 100644
|
||||||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||||
@@ -100,6 +100,30 @@ public class PotionEffect implements ConfigurationSerializable {
|
@@ -100,6 +100,27 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||||
this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
|
this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public PotionEffect withType(PotionEffectType type) {
|
+ public PotionEffect withType(PotionEffectType type) {
|
||||||
+ return new PotionEffect(type, duration, amplifier, ambient, particles, color);
|
+ return new PotionEffect(type, duration, amplifier, ambient, particles, icon);
|
||||||
+ }
|
+ }
|
||||||
+ public PotionEffect withDuration(int duration) {
|
+ public PotionEffect withDuration(int duration) {
|
||||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, color);
|
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||||
+ }
|
+ }
|
||||||
+ public PotionEffect withAmplifier(int amplifier) {
|
+ public PotionEffect withAmplifier(int amplifier) {
|
||||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, color);
|
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||||
+ }
|
+ }
|
||||||
+ public PotionEffect withAmbient(boolean ambient) {
|
+ public PotionEffect withAmbient(boolean ambient) {
|
||||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, color);
|
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||||
+ }
|
+ }
|
||||||
+ public PotionEffect withParticles(boolean particles) {
|
+ public PotionEffect withParticles(boolean particles) {
|
||||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, color);
|
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||||
+ }
|
+ }
|
||||||
+ public PotionEffect withParticles(boolean particles, Color color) {
|
+ public PotionEffect withIcon(boolean icon) {
|
||||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, color);
|
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
|
||||||
+ }
|
|
||||||
+ public PotionEffect withColor(Color color) {
|
|
||||||
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, color);
|
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren