blob: dbbf74f8259308b001f54d05dc4adad6f34b6c93 (
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
|
package jp.plusplus.fbs.api.event;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraft.entity.player.EntityPlayer;
/**
* Created by plusplus_F on 2016/03/06.
*
* プレイヤーがモノクルを持っているかの判定イベント
*/
public class CheckingMonocleEvent extends PlayerEvent {
private boolean has;
private ItemStack monocle;
public CheckingMonocleEvent(EntityPlayer player, ItemStack has) {
super(player);
this.has=(has!=null);
monocle=has;
}
public boolean hasMonocle(){
return has;
}
public ItemStack getMonocle(){
return monocle;
}
public void setMonocle(ItemStack itemStack){
if(itemStack!=null){
has=true;
monocle=itemStack;
}
}
}
|