### Player Ping Command # by Mwthorn (Discord: Mwthorn#2843) (Mail: mwthorn@gmail.com) # Ask for help at any time on the Official Denizen Script Discord: https://discord.gg/Q6pZGSR # Displays a player's current ping. This is mainly just an example on how to make a command with Denizen. # It has the following commands included: # /ping - Check your own ping # /ping (player) - Checks another player's ping ## Instructions: # - Place the script in your script folder. # - Restart server or reload scripts # - Done! Now you can use /ping (player) PlayerPing_Command: type: command name: ping description: "Checks a player's ping from Denizen" usage: "/ping (player)" debug: false script: - if > 0: - define target:]||null> - if <[target]> == null: - narrate "<&7> is not online." - stop - else: - if : - stop - define target: - define ping:<[target].ping||null> - if == null: # Very rare case, but can happen. - narrate "<&e><[target].name>s' ping was not found" - else - narrate "<&e><[target].name>'s ping is <&a><[ping]>"