Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.rbs.slurpiesdongles.events;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.EntityPlayerMP;
- import net.minecraftforge.event.AttachCapabilitiesEvent;
- import net.minecraftforge.fml.common.Mod;
- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- /**
- * Created by RedBu on 3/4/2017.
- */
- @Mod.EventBusSubscriber
- public class PlayerEvents {
- @SubscribeEvent
- public static void attachCaps(AttachCapabilitiesEvent<Entity> evt) {
- if (evt.getObject() instanceof EntityPlayer) {
- if (evt.getObject() instanceof EntityPlayerMP) {
- evt.addCapability(Timers.NAME, new Timers.Provider());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment