Search in sources :

Example 1 with MyPetInventoryActionEvent

use of de.Keyle.MyPet.api.event.MyPetInventoryActionEvent in project MyPet by xXKeyleXx.

the class EntityMyPet method canUseItem.

public boolean canUseItem() {
    MyPetInventoryActionEvent event = new MyPetInventoryActionEvent(myPet, MyPetInventoryActionEvent.Action.Use);
    Bukkit.getServer().getPluginManager().callEvent(event);
    return !event.isCancelled();
}
Also used : MyPetInventoryActionEvent(de.Keyle.MyPet.api.event.MyPetInventoryActionEvent)

Example 2 with MyPetInventoryActionEvent

use of de.Keyle.MyPet.api.event.MyPetInventoryActionEvent in project MyPet by xXKeyleXx.

the class EntityMyPet method canUseItem.

public boolean canUseItem() {
    MyPetInventoryActionEvent event = new MyPetInventoryActionEvent(myPet, MyPetInventoryActionEvent.Action.Use);
    Bukkit.getServer().getPluginManager().callEvent(event);
    return !event.isCancelled();
}
Also used : MyPetInventoryActionEvent(de.Keyle.MyPet.api.event.MyPetInventoryActionEvent)

Example 3 with MyPetInventoryActionEvent

use of de.Keyle.MyPet.api.event.MyPetInventoryActionEvent in project MyPet by xXKeyleXx.

the class EntityMyPet method canUseItem.

public boolean canUseItem() {
    MyPetInventoryActionEvent event = new MyPetInventoryActionEvent(myPet, MyPetInventoryActionEvent.Action.Use);
    Bukkit.getServer().getPluginManager().callEvent(event);
    return !event.isCancelled();
}
Also used : MyPetInventoryActionEvent(de.Keyle.MyPet.api.event.MyPetInventoryActionEvent)

Example 4 with MyPetInventoryActionEvent

use of de.Keyle.MyPet.api.event.MyPetInventoryActionEvent in project MyPet by xXKeyleXx.

the class EntityMyPet method canUseItem.

public boolean canUseItem() {
    MyPetInventoryActionEvent event = new MyPetInventoryActionEvent(myPet, MyPetInventoryActionEvent.Action.Use);
    Bukkit.getServer().getPluginManager().callEvent(event);
    return !event.isCancelled();
}
Also used : MyPetInventoryActionEvent(de.Keyle.MyPet.api.event.MyPetInventoryActionEvent)

Example 5 with MyPetInventoryActionEvent

use of de.Keyle.MyPet.api.event.MyPetInventoryActionEvent in project MyPet by xXKeyleXx.

the class EntityMyPet method canUseItem.

public boolean canUseItem() {
    MyPetInventoryActionEvent event = new MyPetInventoryActionEvent(myPet, MyPetInventoryActionEvent.Action.Use);
    Bukkit.getServer().getPluginManager().callEvent(event);
    return !event.isCancelled();
}
Also used : MyPetInventoryActionEvent(de.Keyle.MyPet.api.event.MyPetInventoryActionEvent)

Aggregations

MyPetInventoryActionEvent (de.Keyle.MyPet.api.event.MyPetInventoryActionEvent)12 MyPetPickupItemEvent (de.Keyle.MyPet.api.event.MyPetPickupItemEvent)1 CustomInventory (de.Keyle.MyPet.api.util.inventory.CustomInventory)1 TagString (de.keyle.knbt.TagString)1 Entity (org.bukkit.entity.Entity)1 ExperienceOrb (org.bukkit.entity.ExperienceOrb)1 Item (org.bukkit.entity.Item)1 PlayerPickupItemEvent (org.bukkit.event.player.PlayerPickupItemEvent)1 ItemStack (org.bukkit.inventory.ItemStack)1