Solved Players tool name not working

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

AlexWarrior

Member
Dec 5, 2020
14
0
1
33
Hello!
Ive been having this issue for awhile now and cant seem to figure it out

I have tried using a different item, removing all addons, changing the name, changing spigots, re downloading skript, and restarted my server.

Code:
on right click holding paper:
    send "debug1"
    name of tool of player is "&f&lFake Logout":
        send "debug2"

The problem is its not get to the debug 2 message. I have code after it but that wont run if the message wont send.
Clip: https://medal.tv/clips/53150177/d1337vpMc0fP

Version: 1.8.8
Skript Version: 2.5.3
Spigot: LightSpigot (this should not madder as it also does not work on other spigots)
 
Test the following
Code:
on right click with paper:
    if name of event-item is "&f&lFake Logout":
        send "test"

and if you want to remove the item after use
Code:
remove 1 of player's tool from player
 
Test the following
Code:
on right click with paper:
    if name of event-item is "&f&lFake Logout":
        send "test"

and if you want to remove the item after use
Code:
remove 1 of player's tool from player

Ty for the help but it still does not seem to work.

Updated code:
Code:
on right click holding paper:
    send "debug1"
    if name of event-item is "&f&lFake Logout":
        send "debug2"
 
Try logging the name of the item name, you can find the file in your Skript folder in a subdirectory called "logs"
Code:
log "%name of event-item%" to "deleteme.log"
 
you might wanna try the following:

If name of event-item contain "Fake Logout":


i know that that works for this snippet of code is on chat:
Code:
on chat:
    if message contain ("cunt", "dick", "nigger" or "fuck"):
        cancel event
        message "you're about to be cursed by those cursewords." to event-player
        if {players::%event-player's UUID%::hasbeenwarned} is false:
            set {players::%event-player's UUID%::hasbeenwarned} to true
        else:
            equip event-player with 1 carved pumpkin
            enchant event-player's helmet with curse of binding
            set {players::%event-player's UUID%::cursed} to true
            message "%event-player's UUID% is now cursed" to players

on player respawn:
    if {players::%event-player's UUID%::cursed} is true:
        equip event-player with 1 carved pumpkin
        enchant event-player's helmet with curse of binding

command /dehardcore <player>:
    executable by: players
    permission: sk.curse.dehardcore
    trigger:
        set {players::%arg 1's UUID%::cursed} to false
        message "hes no longer in hardcore." to event-player


edit: this seems to work for me to get debug 2. (with paperspawn command)
Code:
on right click holding paper:
    send "debug1"
    if name of event-item contain "&f&lFake Logout":
        send "debug2"

command /paperme:
    trigger:
        give event-player 1 paper with name "§f§lFake Logout"
 
Last edited:
  • Like
Reactions: AlexWarrior
you might wanna try the following:

If name of event-item contain "Fake Logout":


i know that that works for this snippet of code is on chat:
Code:
on chat:
    if message contain ("cunt", "dick", "nigger" or "fuck"):
        cancel event
        message "you're about to be cursed by those cursewords." to event-player
        if {players::%event-player's UUID%::hasbeenwarned} is false:
            set {players::%event-player's UUID%::hasbeenwarned} to true
        else:
            equip event-player with 1 carved pumpkin
            enchant event-player's helmet with curse of binding
            set {players::%event-player's UUID%::cursed} to true
            message "%event-player's UUID% is now cursed" to players

on player respawn:
    if {players::%event-player's UUID%::cursed} is true:
        equip event-player with 1 carved pumpkin
        enchant event-player's helmet with curse of binding

command /dehardcore <player>:
    executable by: players
    permission: sk.curse.dehardcore
    trigger:
        set {players::%arg 1's UUID%::cursed} to false
        message "hes no longer in hardcore." to event-player


edit: this seems to work for me to get debug 2. (with paperspawn command)
Code:
on right click holding paper:
    send "debug1"
    if name of event-item contain "&f&lFake Logout":
        send "debug2"

command /paperme:
    trigger:
        give event-player 1 paper with name "§f§lFake Logout"

Tysm this fixed it, thank you to the people who helped!
 
Status
Not open for further replies.