Guest User

Untitled

a guest
Mar 6th, 2017
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. package com.rbs.slurpiesdongles.events;
  2.  
  3. import net.minecraft.entity.Entity;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.entity.player.EntityPlayerMP;
  6. import net.minecraftforge.event.AttachCapabilitiesEvent;
  7. import net.minecraftforge.fml.common.Mod;
  8. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  9.  
  10. /**
  11. * Created by RedBu on 3/4/2017.
  12. */
  13. @Mod.EventBusSubscriber
  14. public class PlayerEvents {
  15. @SubscribeEvent
  16. public static void attachCaps(AttachCapabilitiesEvent<Entity> evt) {
  17. if (evt.getObject() instanceof EntityPlayer) {
  18.  
  19. if (evt.getObject() instanceof EntityPlayerMP) {
  20. evt.addCapability(Timers.NAME, new Timers.Provider());
  21. }
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment