How can I make the player only be able to hit the mob when that player has permission

Discussion in 'General' started by TBeast, Jan 17, 2018.

  1. TBeast

    TBeast New Member

    Joined:
    Oct 2, 2017
    Messages:
    21
    Likes Received:
    5
    How can I make the player only be able to hit the mob when that player has permission. Help me :<
     
    #1
  2. muhahahahe

    muhahahahe Well-Known Member
    Supporter Quality Assurance

    Joined:
    Mar 16, 2017
    Messages:
    984
    Likes Received:
    185
    use the haspermission condition and cancelevent mechanic when condition is false
     
    #2
    TBeast likes this.
  3. TBeast

    TBeast New Member

    Joined:
    Oct 2, 2017
    Messages:
    21
    Likes Received:
    5
    can u make for me an example pls ?:< I'm still lost in conditions :I
     
    #3
  4. Awesome_Dante

    Awesome_Dante Contributor
    Supporter

    Joined:
    May 26, 2016
    Messages:
    731
    Likes Received:
    262
    #4
    TBeast likes this.
  5. TBeast

    TBeast New Member

    Joined:
    Oct 2, 2017
    Messages:
    21
    Likes Received:
    5
    no no no.... in this situation, the condition has permission is for the player that hit the mob, not the mob :I
     
    #5
    Last edited: Jan 20, 2018
  6. Awesome_Dante

    Awesome_Dante Contributor
    Supporter

    Joined:
    May 26, 2016
    Messages:
    731
    Likes Received:
    262
    Exactly :p Mobs don't have a need for a permission system. I'd be interested in seeing how you would force that poor mob to have a permission node xD

    By the way. This is a "TargetConditions:" condition. Not regular "Conditions:"
     
    #6
    TBeast likes this.
  7. TBeast

    TBeast New Member

    Joined:
    Oct 2, 2017
    Messages:
    21
    Likes Received:
    5
    wOw ._. somehow i just feel grateful but also ashamed and waste of time in making mob just really have permission ._.
    Bonus: How can i make a new permission in permission ex ? It dont really need to affect anything
     
    #7
  8. Awesome_Dante

    Awesome_Dante Contributor
    Supporter

    Joined:
    May 26, 2016
    Messages:
    731
    Likes Received:
    262
    I'm not sure how to answer this one. Permissions are created when they are checked. No need to modify PEX or any other plugin.
     
    #8
    TBeast likes this.
  9. TBeast

    TBeast New Member

    Joined:
    Oct 2, 2017
    Messages:
    21
    Likes Received:
    5
    So I just make up a permission ?
     
    #9
  10. Awesome_Dante

    Awesome_Dante Contributor
    Supporter

    Joined:
    May 26, 2016
    Messages:
    731
    Likes Received:
    262
    Yup can be something like "lemme.hit.this.darn.mob" if you want.
     
    #10
    TBeast likes this.
  11. TBeast

    TBeast New Member

    Joined:
    Oct 2, 2017
    Messages:
    21
    Likes Received:
    5
    thks a lot man
     
    #11
  12. Awesome_Dante

    Awesome_Dante Contributor
    Supporter

    Joined:
    May 26, 2016
    Messages:
    731
    Likes Received:
    262
    No problem ^_^
     
    #12

Share This Page