Advertisement
TechMage66

EntityConstructingEventHandler

Mar 12th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. package com.techmage.magetech.handler.event;
  2.  
  3. import com.techmage.magetech.entity.ExtendedPlayerProperties;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraftforge.event.entity.EntityEvent;
  6. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  7.  
  8. public class EntityConstructingEventHandler
  9. {
  10.     @SubscribeEvent
  11.     public void onEntityConstructing(EntityEvent.EntityConstructing event)
  12.     {
  13.         if (event.entity instanceof EntityPlayer && ExtendedPlayerProperties.get((EntityPlayer) event.entity) == null)
  14.         {
  15.             ExtendedPlayerProperties.register((EntityPlayer) event.entity);
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement