summaryrefslogtreecommitdiff
path: root/src/main/java/jp/plusplus/fbs/api/event/PlayerUseMagicEvent.java
blob: d396dd96bf209a9294f8556ec0451496e5ee6dee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package jp.plusplus.fbs.api.event;

import jp.plusplus.fbs.api.MagicBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.player.PlayerEvent;

/**
 * Created by pluslus_F on 2015/06/18.
 */
public class PlayerUseMagicEvent extends PlayerEvent {
    public MagicBase magic;
    public ItemStack[] books;

    public PlayerUseMagicEvent(EntityPlayer player, MagicBase mb, ItemStack[] b) {
        super(player);
        magic=mb;
        books=b;
    }

    @Override
    public boolean isCancelable(){
        return true;
    }

    public static class Pre extends PlayerUseMagicEvent{
        public Pre(EntityPlayer player, MagicBase mb, ItemStack[] b) {
            super(player, mb, b);
        }
    }
    public static class Post extends PlayerUseMagicEvent{
        public Post(EntityPlayer player, MagicBase mb, ItemStack[] b) {
            super(player, mb, b);
        }
    }
}