Description:
I've got fed up of using the nickname plugin, and either getting an error or the wrong person each time.
So, I basically just remade the /tell command to replace the original. (Brilliant if you have the Nickname plugin enabled, but not so useful otherwise).
If you want to add it to the other commands (like /w, and /msg) then use the below code to each command.
I've got fed up of using the nickname plugin, and either getting an error or the wrong person each time.
So, I basically just remade the /tell command to replace the original. (Brilliant if you have the Nickname plugin enabled, but not so useful otherwise).
Code:
./cmd create tell Sends a private message to the given player
./cmd add tell onerror goto 5
./cmd add tell let %player% = %args%[1]
./cmd add tell let %message% = join(%args%[2+], \" \")
./cmd add tell if varset(%args%[1]) != %false% then goto 7
./cmd add tell message %p% §fUsage: /tell <player> <private message ...>
./cmd add tell exit
./cmd add tell if varset(%args%[2]) != %false% then goto 10
./cmd add tell goto 5
./cmd add tell exit
./cmd add tell let %onP% = onlineplayers(%player%)
./cmd add tell let %fonP% = sort(%onP%, \"asc\")
./cmd add tell if %fonP%[0] in onlineplayers(%player%) then goto 20
./cmd add tell message %p% §fThat player cannot be found
./cmd add tell exit
./cmd insert tell 20 # Function
./cmd add tell message %fonP%[0] \"[\" + %p% + \" -> \" + %fonP%[0] + \"] \" + %message%
./cmd add tell message %p% \"[\" + %p% + \" -> \" + %fonP%[0] + \"] \" + %message%
./cmd add tell exit
Code:
./cmd create msg Sends a private message to the given player
./cmd add msg let %command% = join(%args%[1+], \" \")
./cmd add msg asop /cmd run tell %command%