org.bukkit.entity.Witch Java Examples

The following examples show how to use org.bukkit.entity.Witch. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WitchReadyPotionEvent.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Fires thee event, returning the desired potion, or air of cancelled
 *
 * @param witch  the witch whom is readying to use a potion
 * @param potion the potion to be used
 * @return The ItemStack to be used
 */
public static ItemStack process(Witch witch, ItemStack potion) {
    WitchReadyPotionEvent event = new WitchReadyPotionEvent(witch, potion);
    if (!event.callEvent() || event.getPotion() == null) {
        return new ItemStack(Material.AIR);
    }
    return event.getPotion();
}
 
Example #2
Source File: WitchConsumePotionEvent.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public WitchConsumePotionEvent(Witch witch, ItemStack potion) {
    super(witch);
    this.potion = potion;
}
 
Example #3
Source File: WitchConsumePotionEvent.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Witch getEntity() {
    return (Witch) super.getEntity();
}
 
Example #4
Source File: WitchThrowPotionEvent.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public WitchThrowPotionEvent(Witch witch, LivingEntity target, ItemStack potion) {
    super(witch);
    this.target = target;
    this.potion = potion;
}
 
Example #5
Source File: WitchThrowPotionEvent.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Witch getEntity() {
    return (Witch) super.getEntity();
}
 
Example #6
Source File: WitchReadyPotionEvent.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public WitchReadyPotionEvent(Witch witch, ItemStack potion) {
    super(witch);
    this.potion = potion;
}
 
Example #7
Source File: WitchReadyPotionEvent.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Witch getEntity() {
    return (Witch) super.getEntity();
}