Jump to content

Cancel Entity Target from player with permission


eEclpsis

Recommended Posts

Hello everyone, its my first post here, so hi ! I'm eEclpsis, a French girl that love Minecraft and making skript for me and friends !

Actually, i have a little problem with my code, i search a lot of information on Wiki or Google but never find a correct awnser, here my code

on damage of a player:
    if victim has permission "eclpsis.notarget":
        cancel the event
        delete targeted entity of victim

What i want to make : 
I want to disable all target of hostile mobs, when player have a specific permission, the mobs have to cancel the target and damage when he see the player.

If you have a solution or a wki to explain that, that gonna help me so much :)

 

Link to comment
Share on other sites

Hello, i might have solution for you, hope its what you need.

on damage:
    if victim has permission "eclpsis.notarget":
        cancel event

on entity target:
    if entity's target is a player:
        if entity's target has permission "eclpsis.notarget":
            cancel event

Just LMK 😉

have a nice day.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...