diff options
Diffstat (limited to 'src/main/java/jp/plusplus/fbs/api/event/CheckingMonocleEvent.java')
| -rw-r--r-- | src/main/java/jp/plusplus/fbs/api/event/CheckingMonocleEvent.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/jp/plusplus/fbs/api/event/CheckingMonocleEvent.java b/src/main/java/jp/plusplus/fbs/api/event/CheckingMonocleEvent.java new file mode 100644 index 0000000..dbbf74f --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/api/event/CheckingMonocleEvent.java @@ -0,0 +1,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;
+ }
+ }
+}
|
