Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void attachCapability(AttachCapabilitiesEvent<Entity> event) {
- if (!(event.getObject() instanceof EntityPlayer)) {
- return;
- }
- if (event.getObject().hasCapability(DisguiseProvider.DISGUISE, null)) {
- System.out.println("Player already has capability");
- return;
- }
- event.addCapability(new ResourceLocation(Utils.MODID, "disguisecapability"), new DisguiseProvider());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement