Commits

coll1234567 authored and md_5 committed af8a8b708ca
#962: Make PotionEffectType implement Keyed
No tags

src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java

Modified
1 1 package org.bukkit.craftbukkit.potion;
2 2
3 3 import net.minecraft.world.effect.MobEffectList;
4 4 import org.bukkit.Color;
5 5 import org.bukkit.potion.PotionEffectType;
6 6
7 7 public class CraftPotionEffectType extends PotionEffectType {
8 8 private final MobEffectList handle;
9 9
10 10 public CraftPotionEffectType(MobEffectList handle) {
11 - super(MobEffectList.getId(handle));
11 + super(MobEffectList.getId(handle), org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(net.minecraft.core.IRegistry.MOB_EFFECT.getKey(handle)));
12 12 this.handle = handle;
13 13 }
14 14
15 15 @Override
16 16 public double getDurationModifier() {
17 17 return 1.0D;
18 18 }
19 19
20 20 public MobEffectList getHandle() {
21 21 return handle;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut