001    package org.bukkit.potion;
002    
003    public class PotionEffectTypeWrapper extends PotionEffectType {
004        protected PotionEffectTypeWrapper(int id) {
005            super(id);
006        }
007    
008        @Override
009        public double getDurationModifier() {
010            return getType().getDurationModifier();
011        }
012    
013        @Override
014        public String getName() {
015            return getType().getName();
016        }
017    
018        /**
019         * Get the potion type bound to this wrapper.
020         *
021         * @return The potion effect type
022         */
023        public PotionEffectType getType() {
024            return PotionEffectType.getById(getId());
025        }
026    
027        @Override
028        public boolean isInstant() {
029            return getType().isInstant();
030        }
031    }