Solved Get permission for Entity

Discussion in 'Plugin Development' started by chrisman0091, Jan 9, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    chrisman0091

    Im currently making a plugin, and I use the EntityDamageByEntityEvent, the only problem is you cant check a permission for an Entity(most likely because it could be any mob). I need to check if both of the entities have certain permissions(I already check to make sure they are both players). I don't think that supplying code is really needed here, but if you want it, ask. All it is right now is the listener with if to check instanceof Player.

    TL;DR How do I check a permission on a player from EntityDamageByEntityEvent, or what is another way around this to get the same done.
     
  2. Offline

    Windy Day

    After you check if the entity is a player cast the entity to a player.
     
  3. Offline

    chrisman0091

    Don't know why I didn't think of that :confused: Late night haha. Thanks!
     
Thread Status:
Not open for further replies.

Share This Page