#!/usr/bin/env python
""" generated source for module CraftPotionUtil """
from __future__ import print_function
# package: org.bukkit.craftbukkit.potion
class CraftPotionUtil(object):
    """ generated source for class CraftPotionUtil """
    regular = ImmutableBiMap.builder().put(PotionType.UNCRAFTABLE, "empty").put(PotionType.WATER, "water").put(PotionType.MUNDANE, "mundane").put(PotionType.THICK, "thick").put(PotionType.AWKWARD, "awkward").put(PotionType.NIGHT_VISION, "night_vision").put(PotionType.INVISIBILITY, "invisibility").put(PotionType.JUMP, "leaping").put(PotionType.FIRE_RESISTANCE, "fire_resistance").put(PotionType.SPEED, "swiftness").put(PotionType.SLOWNESS, "slowness").put(PotionType.WATER_BREATHING, "water_breathing").put(PotionType.INSTANT_HEAL, "healing").put(PotionType.INSTANT_DAMAGE, "harming").put(PotionType.POISON, "poison").put(PotionType.REGEN, "regeneration").put(PotionType.STRENGTH, "strength").put(PotionType.WEAKNESS, "weakness").put(PotionType.LUCK, "luck").build()
    upgradeable = ImmutableBiMap.builder().put(PotionType.JUMP, "strong_leaping").put(PotionType.SPEED, "strong_swiftness").put(PotionType.INSTANT_HEAL, "strong_healing").put(PotionType.INSTANT_DAMAGE, "strong_harming").put(PotionType.POISON, "strong_poison").put(PotionType.REGEN, "strong_regeneration").put(PotionType.STRENGTH, "strong_strength").build()
    extendable = ImmutableBiMap.builder().put(PotionType.NIGHT_VISION, "long_night_vision").put(PotionType.INVISIBILITY, "long_invisibility").put(PotionType.JUMP, "long_leaping").put(PotionType.FIRE_RESISTANCE, "long_fire_resistance").put(PotionType.SPEED, "long_swiftness").put(PotionType.SLOWNESS, "long_slowness").put(PotionType.WATER_BREATHING, "long_water_breathing").put(PotionType.POISON, "long_poison").put(PotionType.REGEN, "long_regeneration").put(PotionType.STRENGTH, "long_strength").put(PotionType.WEAKNESS, "long_weakness").build()

    @classmethod
    @overloaded
    def fromBukkit(cls, data):
        """ generated source for method fromBukkit """
        type_ = None
        if data.isUpgraded():
            type_ = cls.upgradeable.get(data.getType())
        elif data.isExtended():
            type_ = cls.extendable.get(data.getType())
        else:
            type_ = cls.regular.get(data.getType())
        Preconditions.checkNotNull(type_, "Unknown potion type from data " + data)
        return "minecraft:" + type_

    @classmethod
    @overloaded
    def toBukkit(cls, type_):
        """ generated source for method toBukkit """
        if type_ == None:
            return PotionData(PotionType.UNCRAFTABLE, False, False)
        if type_.startsWith("minecraft:"):
            type_ = type_.substring(10)
        potionType = None
        potionType = cls.extendable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, True, False)
        potionType = cls.upgradeable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, True)
        potionType = cls.regular.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, False)
        return PotionData(PotionType.UNCRAFTABLE, False, False)

    @classmethod
    @fromBukkit.register(object, PotionEffect)
    def fromBukkit_0(cls, effect):
        """ generated source for method fromBukkit_0 """
        type_ = MobEffectList.fromId(effect.getType().getId())
        return MobEffect(type_, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles())

    @classmethod
    @toBukkit.register(object, MobEffect)
    def toBukkit_0(cls, effect):
        """ generated source for method toBukkit_0 """
        type_ = PotionEffectType.getById(MobEffectList.getId(effect.getMobEffect()))
        amp = effect.getAmplifier()
        duration = effect.getDuration()
        ambient = effect.isAmbient()
        particles = effect.isShowParticles()
        return PotionEffect(type_, duration, amp, ambient, particles)

    @classmethod
    def equals(cls, mobEffect, type_):
        """ generated source for method equals """
        typeV = PotionEffectType.getById(MobEffectList.getId(mobEffect))
        return typeV == type_


a3265f42238a017b8d46e96f308ca8764fc59b5a
<mask token>


class CraftPotionUtil(object):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    @classmethod
    @overloaded
    def fromBukkit(cls, data):
        """ generated source for method fromBukkit """
        type_ = None
        if data.isUpgraded():
            type_ = cls.upgradeable.get(data.getType())
        elif data.isExtended():
            type_ = cls.extendable.get(data.getType())
        else:
            type_ = cls.regular.get(data.getType())
        Preconditions.checkNotNull(type_, 'Unknown potion type from data ' +
            data)
        return 'minecraft:' + type_

    @classmethod
    @overloaded
    def toBukkit(cls, type_):
        """ generated source for method toBukkit """
        if type_ == None:
            return PotionData(PotionType.UNCRAFTABLE, False, False)
        if type_.startsWith('minecraft:'):
            type_ = type_.substring(10)
        potionType = None
        potionType = cls.extendable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, True, False)
        potionType = cls.upgradeable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, True)
        potionType = cls.regular.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, False)
        return PotionData(PotionType.UNCRAFTABLE, False, False)
    <mask token>
    <mask token>
    <mask token>

<mask token>


class CraftPotionUtil(object):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    @classmethod
    @overloaded
    def fromBukkit(cls, data):
        """ generated source for method fromBukkit """
        type_ = None
        if data.isUpgraded():
            type_ = cls.upgradeable.get(data.getType())
        elif data.isExtended():
            type_ = cls.extendable.get(data.getType())
        else:
            type_ = cls.regular.get(data.getType())
        Preconditions.checkNotNull(type_, 'Unknown potion type from data ' +
            data)
        return 'minecraft:' + type_

    @classmethod
    @overloaded
    def toBukkit(cls, type_):
        """ generated source for method toBukkit """
        if type_ == None:
            return PotionData(PotionType.UNCRAFTABLE, False, False)
        if type_.startsWith('minecraft:'):
            type_ = type_.substring(10)
        potionType = None
        potionType = cls.extendable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, True, False)
        potionType = cls.upgradeable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, True)
        potionType = cls.regular.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, False)
        return PotionData(PotionType.UNCRAFTABLE, False, False)

    @classmethod
    @fromBukkit.register(object, PotionEffect)
    def fromBukkit_0(cls, effect):
        """ generated source for method fromBukkit_0 """
        type_ = MobEffectList.fromId(effect.getType().getId())
        return MobEffect(type_, effect.getDuration(), effect.getAmplifier(),
            effect.isAmbient(), effect.hasParticles())

    @classmethod
    @toBukkit.register(object, MobEffect)
    def toBukkit_0(cls, effect):
        """ generated source for method toBukkit_0 """
        type_ = PotionEffectType.getById(MobEffectList.getId(effect.
            getMobEffect()))
        amp = effect.getAmplifier()
        duration = effect.getDuration()
        ambient = effect.isAmbient()
        particles = effect.isShowParticles()
        return PotionEffect(type_, duration, amp, ambient, particles)

    @classmethod
    def equals(cls, mobEffect, type_):
        """ generated source for method equals """
        typeV = PotionEffectType.getById(MobEffectList.getId(mobEffect))
        return typeV == type_

<mask token>


class CraftPotionUtil(object):
    <mask token>
    regular = ImmutableBiMap.builder().put(PotionType.UNCRAFTABLE, 'empty'
        ).put(PotionType.WATER, 'water').put(PotionType.MUNDANE, 'mundane'
        ).put(PotionType.THICK, 'thick').put(PotionType.AWKWARD, 'awkward'
        ).put(PotionType.NIGHT_VISION, 'night_vision').put(PotionType.
        INVISIBILITY, 'invisibility').put(PotionType.JUMP, 'leaping').put(
        PotionType.FIRE_RESISTANCE, 'fire_resistance').put(PotionType.SPEED,
        'swiftness').put(PotionType.SLOWNESS, 'slowness').put(PotionType.
        WATER_BREATHING, 'water_breathing').put(PotionType.INSTANT_HEAL,
        'healing').put(PotionType.INSTANT_DAMAGE, 'harming').put(PotionType
        .POISON, 'poison').put(PotionType.REGEN, 'regeneration').put(PotionType
        .STRENGTH, 'strength').put(PotionType.WEAKNESS, 'weakness').put(
        PotionType.LUCK, 'luck').build()
    upgradeable = ImmutableBiMap.builder().put(PotionType.JUMP,
        'strong_leaping').put(PotionType.SPEED, 'strong_swiftness').put(
        PotionType.INSTANT_HEAL, 'strong_healing').put(PotionType.
        INSTANT_DAMAGE, 'strong_harming').put(PotionType.POISON,
        'strong_poison').put(PotionType.REGEN, 'strong_regeneration').put(
        PotionType.STRENGTH, 'strong_strength').build()
    extendable = ImmutableBiMap.builder().put(PotionType.NIGHT_VISION,
        'long_night_vision').put(PotionType.INVISIBILITY, 'long_invisibility'
        ).put(PotionType.JUMP, 'long_leaping').put(PotionType.
        FIRE_RESISTANCE, 'long_fire_resistance').put(PotionType.SPEED,
        'long_swiftness').put(PotionType.SLOWNESS, 'long_slowness').put(
        PotionType.WATER_BREATHING, 'long_water_breathing').put(PotionType.
        POISON, 'long_poison').put(PotionType.REGEN, 'long_regeneration').put(
        PotionType.STRENGTH, 'long_strength').put(PotionType.WEAKNESS,
        'long_weakness').build()

    @classmethod
    @overloaded
    def fromBukkit(cls, data):
        """ generated source for method fromBukkit """
        type_ = None
        if data.isUpgraded():
            type_ = cls.upgradeable.get(data.getType())
        elif data.isExtended():
            type_ = cls.extendable.get(data.getType())
        else:
            type_ = cls.regular.get(data.getType())
        Preconditions.checkNotNull(type_, 'Unknown potion type from data ' +
            data)
        return 'minecraft:' + type_

    @classmethod
    @overloaded
    def toBukkit(cls, type_):
        """ generated source for method toBukkit """
        if type_ == None:
            return PotionData(PotionType.UNCRAFTABLE, False, False)
        if type_.startsWith('minecraft:'):
            type_ = type_.substring(10)
        potionType = None
        potionType = cls.extendable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, True, False)
        potionType = cls.upgradeable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, True)
        potionType = cls.regular.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, False)
        return PotionData(PotionType.UNCRAFTABLE, False, False)

    @classmethod
    @fromBukkit.register(object, PotionEffect)
    def fromBukkit_0(cls, effect):
        """ generated source for method fromBukkit_0 """
        type_ = MobEffectList.fromId(effect.getType().getId())
        return MobEffect(type_, effect.getDuration(), effect.getAmplifier(),
            effect.isAmbient(), effect.hasParticles())

    @classmethod
    @toBukkit.register(object, MobEffect)
    def toBukkit_0(cls, effect):
        """ generated source for method toBukkit_0 """
        type_ = PotionEffectType.getById(MobEffectList.getId(effect.
            getMobEffect()))
        amp = effect.getAmplifier()
        duration = effect.getDuration()
        ambient = effect.isAmbient()
        particles = effect.isShowParticles()
        return PotionEffect(type_, duration, amp, ambient, particles)

    @classmethod
    def equals(cls, mobEffect, type_):
        """ generated source for method equals """
        typeV = PotionEffectType.getById(MobEffectList.getId(mobEffect))
        return typeV == type_

<mask token>
from __future__ import print_function


class CraftPotionUtil(object):
    """ generated source for class CraftPotionUtil """
    regular = ImmutableBiMap.builder().put(PotionType.UNCRAFTABLE, 'empty'
        ).put(PotionType.WATER, 'water').put(PotionType.MUNDANE, 'mundane'
        ).put(PotionType.THICK, 'thick').put(PotionType.AWKWARD, 'awkward'
        ).put(PotionType.NIGHT_VISION, 'night_vision').put(PotionType.
        INVISIBILITY, 'invisibility').put(PotionType.JUMP, 'leaping').put(
        PotionType.FIRE_RESISTANCE, 'fire_resistance').put(PotionType.SPEED,
        'swiftness').put(PotionType.SLOWNESS, 'slowness').put(PotionType.
        WATER_BREATHING, 'water_breathing').put(PotionType.INSTANT_HEAL,
        'healing').put(PotionType.INSTANT_DAMAGE, 'harming').put(PotionType
        .POISON, 'poison').put(PotionType.REGEN, 'regeneration').put(PotionType
        .STRENGTH, 'strength').put(PotionType.WEAKNESS, 'weakness').put(
        PotionType.LUCK, 'luck').build()
    upgradeable = ImmutableBiMap.builder().put(PotionType.JUMP,
        'strong_leaping').put(PotionType.SPEED, 'strong_swiftness').put(
        PotionType.INSTANT_HEAL, 'strong_healing').put(PotionType.
        INSTANT_DAMAGE, 'strong_harming').put(PotionType.POISON,
        'strong_poison').put(PotionType.REGEN, 'strong_regeneration').put(
        PotionType.STRENGTH, 'strong_strength').build()
    extendable = ImmutableBiMap.builder().put(PotionType.NIGHT_VISION,
        'long_night_vision').put(PotionType.INVISIBILITY, 'long_invisibility'
        ).put(PotionType.JUMP, 'long_leaping').put(PotionType.
        FIRE_RESISTANCE, 'long_fire_resistance').put(PotionType.SPEED,
        'long_swiftness').put(PotionType.SLOWNESS, 'long_slowness').put(
        PotionType.WATER_BREATHING, 'long_water_breathing').put(PotionType.
        POISON, 'long_poison').put(PotionType.REGEN, 'long_regeneration').put(
        PotionType.STRENGTH, 'long_strength').put(PotionType.WEAKNESS,
        'long_weakness').build()

    @classmethod
    @overloaded
    def fromBukkit(cls, data):
        """ generated source for method fromBukkit """
        type_ = None
        if data.isUpgraded():
            type_ = cls.upgradeable.get(data.getType())
        elif data.isExtended():
            type_ = cls.extendable.get(data.getType())
        else:
            type_ = cls.regular.get(data.getType())
        Preconditions.checkNotNull(type_, 'Unknown potion type from data ' +
            data)
        return 'minecraft:' + type_

    @classmethod
    @overloaded
    def toBukkit(cls, type_):
        """ generated source for method toBukkit """
        if type_ == None:
            return PotionData(PotionType.UNCRAFTABLE, False, False)
        if type_.startsWith('minecraft:'):
            type_ = type_.substring(10)
        potionType = None
        potionType = cls.extendable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, True, False)
        potionType = cls.upgradeable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, True)
        potionType = cls.regular.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, False)
        return PotionData(PotionType.UNCRAFTABLE, False, False)

    @classmethod
    @fromBukkit.register(object, PotionEffect)
    def fromBukkit_0(cls, effect):
        """ generated source for method fromBukkit_0 """
        type_ = MobEffectList.fromId(effect.getType().getId())
        return MobEffect(type_, effect.getDuration(), effect.getAmplifier(),
            effect.isAmbient(), effect.hasParticles())

    @classmethod
    @toBukkit.register(object, MobEffect)
    def toBukkit_0(cls, effect):
        """ generated source for method toBukkit_0 """
        type_ = PotionEffectType.getById(MobEffectList.getId(effect.
            getMobEffect()))
        amp = effect.getAmplifier()
        duration = effect.getDuration()
        ambient = effect.isAmbient()
        particles = effect.isShowParticles()
        return PotionEffect(type_, duration, amp, ambient, particles)

    @classmethod
    def equals(cls, mobEffect, type_):
        """ generated source for method equals """
        typeV = PotionEffectType.getById(MobEffectList.getId(mobEffect))
        return typeV == type_

#!/usr/bin/env python
""" generated source for module CraftPotionUtil """
from __future__ import print_function
# package: org.bukkit.craftbukkit.potion
class CraftPotionUtil(object):
    """ generated source for class CraftPotionUtil """
    regular = ImmutableBiMap.builder().put(PotionType.UNCRAFTABLE, "empty").put(PotionType.WATER, "water").put(PotionType.MUNDANE, "mundane").put(PotionType.THICK, "thick").put(PotionType.AWKWARD, "awkward").put(PotionType.NIGHT_VISION, "night_vision").put(PotionType.INVISIBILITY, "invisibility").put(PotionType.JUMP, "leaping").put(PotionType.FIRE_RESISTANCE, "fire_resistance").put(PotionType.SPEED, "swiftness").put(PotionType.SLOWNESS, "slowness").put(PotionType.WATER_BREATHING, "water_breathing").put(PotionType.INSTANT_HEAL, "healing").put(PotionType.INSTANT_DAMAGE, "harming").put(PotionType.POISON, "poison").put(PotionType.REGEN, "regeneration").put(PotionType.STRENGTH, "strength").put(PotionType.WEAKNESS, "weakness").put(PotionType.LUCK, "luck").build()
    upgradeable = ImmutableBiMap.builder().put(PotionType.JUMP, "strong_leaping").put(PotionType.SPEED, "strong_swiftness").put(PotionType.INSTANT_HEAL, "strong_healing").put(PotionType.INSTANT_DAMAGE, "strong_harming").put(PotionType.POISON, "strong_poison").put(PotionType.REGEN, "strong_regeneration").put(PotionType.STRENGTH, "strong_strength").build()
    extendable = ImmutableBiMap.builder().put(PotionType.NIGHT_VISION, "long_night_vision").put(PotionType.INVISIBILITY, "long_invisibility").put(PotionType.JUMP, "long_leaping").put(PotionType.FIRE_RESISTANCE, "long_fire_resistance").put(PotionType.SPEED, "long_swiftness").put(PotionType.SLOWNESS, "long_slowness").put(PotionType.WATER_BREATHING, "long_water_breathing").put(PotionType.POISON, "long_poison").put(PotionType.REGEN, "long_regeneration").put(PotionType.STRENGTH, "long_strength").put(PotionType.WEAKNESS, "long_weakness").build()

    @classmethod
    @overloaded
    def fromBukkit(cls, data):
        """ generated source for method fromBukkit """
        type_ = None
        if data.isUpgraded():
            type_ = cls.upgradeable.get(data.getType())
        elif data.isExtended():
            type_ = cls.extendable.get(data.getType())
        else:
            type_ = cls.regular.get(data.getType())
        Preconditions.checkNotNull(type_, "Unknown potion type from data " + data)
        return "minecraft:" + type_

    @classmethod
    @overloaded
    def toBukkit(cls, type_):
        """ generated source for method toBukkit """
        if type_ == None:
            return PotionData(PotionType.UNCRAFTABLE, False, False)
        if type_.startsWith("minecraft:"):
            type_ = type_.substring(10)
        potionType = None
        potionType = cls.extendable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, True, False)
        potionType = cls.upgradeable.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, True)
        potionType = cls.regular.inverse().get(type_)
        if potionType != None:
            return PotionData(potionType, False, False)
        return PotionData(PotionType.UNCRAFTABLE, False, False)

    @classmethod
    @fromBukkit.register(object, PotionEffect)
    def fromBukkit_0(cls, effect):
        """ generated source for method fromBukkit_0 """
        type_ = MobEffectList.fromId(effect.getType().getId())
        return MobEffect(type_, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles())

    @classmethod
    @toBukkit.register(object, MobEffect)
    def toBukkit_0(cls, effect):
        """ generated source for method toBukkit_0 """
        type_ = PotionEffectType.getById(MobEffectList.getId(effect.getMobEffect()))
        amp = effect.getAmplifier()
        duration = effect.getDuration()
        ambient = effect.isAmbient()
        particles = effect.isShowParticles()
        return PotionEffect(type_, duration, amp, ambient, particles)

    @classmethod
    def equals(cls, mobEffect, type_):
        """ generated source for method equals """
        typeV = PotionEffectType.getById(MobEffectList.getId(mobEffect))
        return typeV == type_

