Pinger:
type: world
events:
on player chats:
- foreach <server.list_online_players> {
- if <context.message> contains %value% && <%value%.flag[ping]> == true || <%value%.flag[ping]> == null {
- playsound %value% sound:NOTE_PLING pitch:10
}
}
on pingme command:
- if <player.has_flag[ping]> {
- if <player.flag[ping]> == true {
- flag <player> ping:false
- narrate "<&c>You have disabled players to ping you!"
- determine fulfilled
}
- if <player.flag[ping]> == false {
- flag <player> ping:true
- narrate "<&a>You have enabled players to ping you!"
- determine fulfilled
}
} else {
- flag <player> ping:false
- narrate "<&c>You have disabled players to ping you!"
- determine fulfilled
}