package com.atsuishio.superbwarfare.capability; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.AttachCapabilitiesEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber() public class CapabilityHandler { @SubscribeEvent public static void registerCapabilities(AttachCapabilitiesEvent event) { if (event.getObject() instanceof Player) { event.addCapability(LaserCapability.ID, new LaserCapability.LaserCapabilityProvider()); } } }