@@ -5,7 +5,7 @@ Subject: [PATCH] Potion NamespacedKey
55
66
77diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
8- index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908e9dbc2fc 100644
8+ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f026703cb80 100644
99--- a/src/main/java/org/bukkit/potion/PotionEffect.java
1010+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
1111@@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableMap;
@@ -16,7 +16,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
1616 import org.bukkit.configuration.serialization.ConfigurationSerializable;
1717 import org.bukkit.configuration.serialization.SerializableAs;
1818 import org.bukkit.entity.LivingEntity;
19- @@ -26 ,12 +27 ,14 @@ public class PotionEffect implements ConfigurationSerializable {
19+ @@ -31 ,12 +32 ,14 @@ public class PotionEffect implements ConfigurationSerializable {
2020 private static final String AMBIENT = "ambient";
2121 private static final String PARTICLES = "has-particles";
2222 private static final String ICON = "has-icon";
@@ -31,7 +31,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
3131
3232 /**
3333 * Creates a potion effect.
34- @@ -44 ,6 +47 ,36 @@ public class PotionEffect implements ConfigurationSerializable {
34+ @@ -49 ,6 +52 ,36 @@ public class PotionEffect implements ConfigurationSerializable {
3535 * @param icon the icon status, see {@link PotionEffect#hasIcon()}
3636 */
3737 public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) {
@@ -68,15 +68,15 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
6868 Preconditions.checkArgument(type != null, "effect type cannot be null");
6969 this.type = type;
7070 this.duration = duration;
71- @@ -51 ,6 +84 ,7 @@ public class PotionEffect implements ConfigurationSerializable {
71+ @@ -56 ,6 +89 ,7 @@ public class PotionEffect implements ConfigurationSerializable {
7272 this.ambient = ambient;
7373 this.particles = particles;
7474 this.icon = icon;
7575+ this.key = key; // Purpur - add key
7676 }
7777
7878 /**
79- @@ -98 ,36 +132 ,43 @@ public class PotionEffect implements ConfigurationSerializable {
79+ @@ -103 ,36 +137 ,43 @@ public class PotionEffect implements ConfigurationSerializable {
8080 * @param map the map to deserialize from
8181 */
8282 public PotionEffect(@NotNull Map<String, Object> map) {
@@ -127,7 +127,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
127127 @NotNull
128128 private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
129129 int type = getInt(map, TYPE);
130- @@ -154 ,17 +195 ,33 @@ public class PotionEffect implements ConfigurationSerializable {
130+ @@ -159 ,17 +200 ,33 @@ public class PotionEffect implements ConfigurationSerializable {
131131 return def;
132132 }
133133
@@ -169,7 +169,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
169169 }
170170
171171 /**
172- @@ -188 ,7 +245 ,7 @@ public class PotionEffect implements ConfigurationSerializable {
172+ @@ -193 ,7 +250 ,7 @@ public class PotionEffect implements ConfigurationSerializable {
173173 return false;
174174 }
175175 PotionEffect that = (PotionEffect) obj;
@@ -178,7 +178,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
178178 }
179179
180180 /**
181- @@ -256 ,6 +313 ,24 @@ public class PotionEffect implements ConfigurationSerializable {
181+ @@ -289 ,6 +346 ,24 @@ public class PotionEffect implements ConfigurationSerializable {
182182 return icon;
183183 }
184184
@@ -203,7 +203,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
203203 @Override
204204 public int hashCode() {
205205 int hash = 1;
206- @@ -270 ,6 +345 ,6 @@ public class PotionEffect implements ConfigurationSerializable {
206+ @@ -303 ,6 +378 ,6 @@ public class PotionEffect implements ConfigurationSerializable {
207207
208208 @Override
209209 public String toString() {
0 commit comments