This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
i have a player selector with custom data but i want to use a command like /warns <player> and have the player link with the player in the command how would i go about doing that
You want to make a warning command? By linking you mean sending a warning message to a selected <player> when YOU type the command? From what I know, mycmd doesn't have a feature to run a command for other specific $player, but you could use EssentialsX's "/sudo <player> <command>" command to send him your custom made $text$warning message, or something like that.If you are interested, you can try my warning command "/warning <player> <reason>" which warns player and shows him a warning reason and plays him a scary roar sound effect:
#================ WARNING SYSTEM ================Warning_Command: command: /warning type: RUN_COMMAND runcmd: - '$broadcasttext$&6Player&c $arg1 &6was warned by $player.' - '$Script$%Variable%warning_cmd_author=$player' - '$Script$%Variable%warning_cmd_message=$multiargs' - '$RUN_CONSOLE$/sudo $arg1 zgel5su6qhl9p6s $multiargs' register: true required_args: 2 tab_completer: 1: - $player_list 2: - reason broadcast_message_permission_node: warning.admin permission-node: warning.admin permission-error: '&cYou don't have a permission to run this command.'
Warning_Receive: command: /zgel5su6qhl9p6s type: RUN_COMMAND runcmd: - '$text$&c&lYou have been warned by warning_cmd_author! Reason:&6 $multiargs&c&l.' - '$RUN_CONSOLE$/execute at $player run playsound minecraft:entity.ravager.roar block $player' permission-required: false
You need to add 2 variables before using it:"/mycmd-variables create warning_cmd_author" and "/mycmd-variables create warning_cmd_message"
To post a comment, please login or register a new account.