Advertisement
Creepinson

Untitled

Jul 4th, 2017
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. @SubscribeEvent
  2. public void attachCapability(AttachCapabilitiesEvent<Entity> event) {
  3.  
  4. if (!(event.getObject() instanceof EntityPlayer)) {
  5. return;
  6. }
  7.  
  8. if (event.getObject().hasCapability(DisguiseProvider.DISGUISE, null)) {
  9. System.out.println("Player already has capability");
  10. return;
  11. }
  12. event.addCapability(new ResourceLocation(Utils.MODID, "disguisecapability"), new DisguiseProvider());
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement