001    package org.bukkit.block;
002    
003    import org.bukkit.entity.CreatureType;
004    import org.bukkit.entity.EntityType;
005    
006    /**
007     * Represents a creature spawner.
008     */
009    public interface CreatureSpawner extends BlockState {
010    
011        /**
012         * Get the spawner's creature type.
013         *
014         * @return The creature type.
015         * @deprecated In favour of {@link #getSpawnedType()}.
016         */
017        @Deprecated
018        public CreatureType getCreatureType();
019    
020        /**
021         * Get the spawner's creature type.
022         *
023         * @return The creature type.
024         */
025        public EntityType getSpawnedType();
026    
027        /**
028         * Set the spawner's creature type.
029         *
030         * @param creatureType The creature type.
031         */
032        public void setSpawnedType(EntityType creatureType);
033    
034        /**
035         * Set the spawner creature type.
036         *
037         * @param creatureType The creature type.
038         * @deprecated In favour of {@link #setSpawnedType(EntityType)}.
039         */
040        @Deprecated
041        public void setCreatureType(CreatureType creatureType);
042    
043        /**
044         * Get the spawner's creature type.
045         *
046         * @return The creature type's name.
047         * @deprecated Use {@link #getCreatureTypeName()}.
048         */
049        @Deprecated
050        public String getCreatureTypeId();
051    
052        /**
053         * Set the spawner mob type.
054         *
055         * @param creatureType The creature type's name.
056         */
057        public void setCreatureTypeByName(String creatureType);
058    
059        /**
060         * Get the spawner's creature type.
061         *
062         * @return The creature type's name.
063         */
064        public String getCreatureTypeName();
065    
066        /**
067         * Set the spawner mob type.
068         *
069         * @param creatureType The creature type's name.
070         * @deprecated Use {@link #setCreatureTypeByName(String)}.
071         */
072        @Deprecated
073        public void setCreatureTypeId(String creatureType);
074    
075        /**
076         * Get the spawner's delay.
077         *
078         * @return The delay.
079         */
080        public int getDelay();
081    
082        /**
083         * Set the spawner's delay.
084         *
085         * @param delay The delay.
086         */
087        public void setDelay(int delay);
088    }