• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Simple Join and Leave Trigger custom message.

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.

xdelpedes

Tree Puncher
#1
This is a very simple custom leave and join message trigger in madcmd.

Copy and Paste this command on Rcon or in the game:

Bash:
cmd create jal Join and Leave Trigger
cmd insert jal 1 let %player% = %args%[2]
cmd insert jal 2 if %args%[1] = \"login\" then goto 5
cmd insert jal 3 if %args%[1] = \"leave\" then goto 10
cmd insert jal 4 exitcmd insert jal 5 # Login
cmd insert jal 5 message onlineplayers() \"§ 8[§6!§ 8] §b\" + %p% + \" §fhas joined the game.\"
cmd insert jal 6 exit
cmd insert jal 9 # Leave
cmd insert jal 10 message onlineplayers() \"§ 8[§6!§ 8] §b\" + %p% + \" §fleft the game.\"
cmd insert jal 11 exit


cmd trigger jal login
cmd trigger jal leave

To get rid the old default msg to your server, just type this command.
/setgperm {GROUP_NAME_HERE} -pocketmine.broadcast.user

Note ^: it will still appear the default join and leave msg for Op's players but non op's players will not appear the message which is that's ok.
Post automatically merged:

Sorry my bad i have typo in line 5.. i can't edit my post so i will just reply to his thread for fixed version of this.

Fixed Version:
Code:
cmd create jal Join and Leave Trigger
cmd insert jal 1 let %player% = %args%[2]
cmd insert jal 2 if %args%[1] = \"login\" then goto 5
cmd insert jal 3 if %args%[1] = \"leave\" then goto 9
cmd insert jal 4 exit
cmd insert jal 5 # Login
cmd insert jal 6 message onlineplayers() \"§ 8[§6!§ 8] §b\" + %p% + \" §fhas joined the game.\"
cmd insert jal 7 exit
cmd insert jal 8 # Leave
cmd insert jal 9 message onlineplayers() \"§ 8[§6!§ 8] §b\" + %p% + \" §fleft the game.\"
cmd insert jal 10 exit

cmd trigger jal login
cmd trigger jal leave
 
Last edited: