1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Anti Phantom for player Skript

Discussion in 'Requests' started by harman, Oct 12, 2022.

  1. harman

    harman Member

    Joined:
    Oct 12, 2022
    Messages:
    2
    Likes Received:
    0
    Suggested name: Anti Phantom
    Spigot/Skript Version: Server 1.19.2 - Skript 2.6.3

    What I want:
    I want people to be able to turn phantoms created for them on and off with the /antiphantom command.

    Ideas for commands:
    /antiphantom

    Ideas for permissions:
    antiphantom.use
    When I'd like it by: No real deadline but ASAP


    if theres already a working one out there let me know, i cant find any. (at least free)


     
  2. Best Answer:
    Post #3 by lotzy, Oct 13, 2022
  3. Pierrelasse

    Pierrelasse Active Member

    Joined:
    Apr 20, 2022
    Messages:
    116
    Likes Received:
    4
    Code (Text):
    1.  
    2. on spawn of phantom:
    3.   delete event-entity
    4.  
    ????
     
  4. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    Code (Text):
    1. command /antiphantom [<text>]:
    2.   permission: antiphantom.use
    3.   trigger:
    4.     if {-p::%uuid of player%::antiPhantom} is set:
    5.       delete {-p::%uuid of player%::antiPhantom}
    6.       send "&c> &fAntiphantom deactivated"
    7.     else:
    8.       set {-p::%uuid of player%::antiPhantom} to true
    9.       send "&a> &fAntiphantom activated"
    10. on entity target:
    11.   if event-entity is phantom:
    12.     if {-p::%uuid of target%::antiPhantom} is true:
    13.       delete event-entity
    14.       cancel event
     
  5. harman

    harman Member

    Joined:
    Oct 12, 2022
    Messages:
    2
    Likes Received:
    0
    Thank you ^^
     
    • Friendly Friendly x 1

Share This Page

Loading...