##################################################################### #| |# #| dCommands |# #| |# #| A script that adds highly customizable commands. |# #| |# ##################################################################### #| |# #| Author: Bill Gates Denizen Build: REL1779 |# #| Date: 2022/11/02 Script Version: 1.01 |# #| |# ##################################################################### # # ---------------------------- CONFIG START --------------------------- dcommands_config: type: data ## DON'T CHANGE DATA NAMES, ONLY THEIR VALUES! ## FOR SPECIAL CHARACTERS LIKE [] OR <>, USE THEIR RESPECTIVE TAGS ## ALL COLOR INPUTS NEED TO BE A VALID COLORTAG! If invalid, they'll default to white. server: # Name of your server here. Use to not have one. name: dCommands # This will appear before the name of your server. Use to not have one. prefix: <&lb> # This will appear after the name of your server. Use to not have one. suffix: <&rb> # This will be the color of your server's name. color: # These are the messages and colors that'll be broadcasted when using the /save command. save: saving: Saving world files.. saved: World files saved. color: <&[warning]> # These are the messages and colors that'll be broadcasted when using the /restart command. restart: # The time will be automatically added after the message, don't try to add it yourself! message: Restarting server in color: end: Server restarting. enchant: # These are specific error messages that will be shown under specific conditions. All of them will share the same color. error: invalid_enchant: This enchantment does not exist! remove_no_permission: You don't have permission to remove enchantments! no_enchant: Item doesn't have this enchantment! color: <&[error]> # This is the color for when an /enchant runs succesfully. color: <&[emphasis]> private: # This is the color that private messages will have. message: # These are the colors that player names will have in private messages. Their names are self-explanatory. sender: receiver: # These are the error messages for the /tell, /msg, and /message commands. They'll share the same color. error: msg_to_yourself: You can't send messages to yourself! empty_message: You can't send an empty message! color: <&[error]> # These are the error messages for the /r command. They'll share the same color. reply: no_replies: You don't have anyone to reply to! not_online: The last player that messaged you isn't online anymore! empty: Your message cannot be empty! color: <&[error]> clearchat: # This is the message that'll be shown after cleaning up chat. message: Chat cleared. # This is the color that the message will have. color: ban: message: # These are the messages that'll be shown when kicking a banned player from the server. perma: You're permanently banned from this server! temp: header: You're temporarily banned from this server! # The duration of the player's ban is automatically added after your footer message. ## Don't try to input the duration yourself, it WILL break. footer: Your ban lasts until<&co> # This is the color that the messages above will have. If invalid, will default to the server color. color: # This is the color ban reasons and durations will have. value: # - These colors will also be used when preventing a banned user from joining the server! unban: # This is the color that the unban announcement message will have. message: # OPTIONAL: This is the color the unbanned player's name will have. # You can use to default to the message's color. player: # These are the messages and colors that will be used by the gamemode commands. gamemode: creative: self: Gamemode set to creative. another: Gamemode set to creative by an admin. color: <&[warning]> survival: self: Gamemode set to survival. another: Gamemode set to survival by an admin. color: <&[warning]> spectator: self: Gamemode set to spectator. another: Gamemode set to spectator by an admin. color: <&[warning]> adventure: self: Gamemode set to adventure. another: Gamemode set to adventure by an admin. color: <&[warning]> # These are the colors for the command /dcommands, which lists all available dCommands. dcommands: header: # This will be the text before the list of commands. # Be careful with what you put in here, and remember to always use symbols' respective tags. text: All available dCommands<&co> # This is the color of the header text. color: # This is the color that commands will have. If invalid, will default to the header color. commands: separator: # This is the symbol that'll appear before a command. # Be careful with what you put in here, and remember to always use symbols' respective tags. symbol: → # This is the color that the symbol will use. color: # Will narrate a separate list containing all disabled dCommands if the player is opped. show_disabled_dcommands: true # These are the configurations for the /heal command. heal: message: # Message sent to you, when you heal yourself. self: You healed yourself! another: # Message sent to the player you healed. theirs: You've been healed by a higher power! # Message sent to yourself after healing someone else. The next word will be the player's name. # This would mean that a 'You just healed' input, would actually produce 'You just healed PoopSlayer69!' yours: You just healed # This is the color that the messages above will be. color: # This is the color that /heal's numbers will have. numbers: separator: # This will appear in between the old health and the new health. # Example: 10 → 20 symbol: → # You can use here. If you do, it'll use the same color as the message color. color: feed: message: # Message sent to you, when you feed yourself. self: You fed yourself! # Message sent to the player you fed. another: You've been fed by a higher power! # This is the color the messages above will use. color: vanish: message: # Self-explanatory. on: You are now vanished. off: You are no longer vanished. color: <&[warning]> fly: message: # Speed tag must have .mul[10]! The script works with it's value multiplied by 10 to be more human understandable, changing it would create confusion. on: Fly mode turned on, at speed . off: Fly mode turned off. color: <&[warning]> arguments: not_enough: message: Not enough arguments! Correct usage<&co> color: <&[error]> too_many: message: Too many arguments! Correct usage<&co> color: <&[error]> command_info: usage: <&[warning]> description: <&[base]> message: <&[emphasis]> inject_player: message: Player not found! color: <&[error]> smite: warn_target: enabled: false message: You have been struck! color: <&[warning]> godmode: on: message: Godmode turned on. color: <&[warning]> off: message: Godmode turned off. color: <&[warning]> # For more advanced users: # Every script has it's own usage and description data args, they're used whenever you use the commands wrong # So if you want to change the messages that are shown there, edit them to whatever you want. # If you're feeling extra smart today, L944 has the injectable tasks that take care of that. # Please don't change anything after this config section if you're not 200% sure of what you are doing, as changes may create conflicts with other commands or the entire script. # ---------------------------- CONFIG END ---------------------------- # ----------------- DONT TOUCH FILE AFTER THIS POINT ----------------- dcommands_save: type: command name: save description: Saves denizen files and world files. usage: /save permission: dcommands.save tab completions: 1: data: arguments: single: true debug: false script: - define save.saving - define save.saved - define save.color ].if_null[]> - inject dcommands_inject_arguments - inject dcommands_server_definitions - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[save.color]>]> <[save.saving]>" - announce to_console <&color[<[save.color]>]><[save.saving]> - foreach as:world: - wait 0.01s - adjust <[world]> save - adjust server save - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[save.color]>]> <[save.saved]>" - announce to_console <&color[<[save.color]>]><[save.saved]> dcommands_restart: type: command name: restart description: Restarts the server after given DurationTag input. If no DurationTag is given, defaults to 30 seconds. usage: /restart (DurationTag) permission: dcommands.restart tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - narrate "<&[error]>Server is already restarting!" - stop - flag server dcommands.restarting - inject dcommands_server_definitions - definemap restart: message: color: ].if_null[]> end: - if : - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[restart.color]>]> <[restart.message]> 30 seconds." - announce to_console "<&color[<[restart.color]>]><[restart.message]> 30 seconds." - wait 20s - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[restart.color]>]> <[restart.message]> 10 seconds." - announce to_console "<&color[<[restart.color]>]><[restart.message]> 10 seconds." - wait 5s - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[restart.color]>]> <[restart.message]> 5 seconds." - announce to_console "<&color[<[restart.color]>]><[restart.message]> 5 seconds." - wait 5s - adjust server restart - stop - define duration ].if_null[null]> - if <[duration]> == null: - narrate "<&[error]>Not a valid DurationTag! Examples of valid DurationTags:" - narrate "<&[error]>15s, 15m, 15h." - stop - repeat 20: - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[restart.color]>]> <[restart.message]> <[duration].formatted_words>." - announce to_console "<&4>Restarting server in <[duration].formatted_words>." - define duration <[duration].in_seconds.div[2]> - if <[duration]> > 10: - define duration <[duration].round_up_to_precision[10]> - else: - define duration <[duration].round_up_to_precision[0.1]> - if <[duration]> <= 1: - wait 1s - announce <[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[restart.color]>]> <[restart.end]> - announce to_console <&color[<[restart.color]>]> <[restart.end]> - wait 1s - adjust server restart - stop - define duration ]> - wait <[duration]> dcommands_enchant: type: command name: enchant description: Enchants the item in your hand up to level 255, or removes enchantments from it. usage: /enchant [enchantment] (level | remove) permission: dcommands.enchant tab completions: 1: 2: remove data: arguments: minimum: 1 maximum: 2 debug: false script: - inject dcommands_inject_arguments - define enchantraw - define enchant ].if_null[null]> - define color ].if_null[]> - define error.color ].if_null[]> - if <[enchant]> == null: - narrate <&color[<[error.color]>]> - stop - define arg - if <[arg].is_integer>: - narrate "<&color[<[color]>]>Enchanting with <[enchant].full_name[<[arg]>].strip_color>." - inventory adjust slot:hand enchantments:<[enchantraw]>,<[arg]> - else: - if <[arg]> == remove: - if !: - narrate <&color[<[error.color]>]> - stop - if !]>: - narrate <&color[<[error.color]>]> - stop - define level ]> - inventory adjust slot:hand remove_enchantments:<[enchantraw]> - narrate "<&color[<[color]>]>Removed <[enchant].full_name[<[level]>].strip_color> from ." - else: - narrate "<&[error]>Incorrect usage!" - narrate <&[error]> dcommands_ban_handler: type: world debug: false events: on player prelogin flagged:dcommands.banned: - determine kicked+|]> on player prelogin flagged:dcommands.tempbanned: - determine kicked+||]> dcommands_ban_proc: type: procedure definitions: player|reason debug: false script: - inject dcommands_server_definitions - inject dcommands_ban_definitions - determine "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&nl><&color[<[ban.message.color]>]><[ban.message.perma]><&nl><&nl><&color[<[ban.message.color]>]>Reason: <&color[<[ban.value]>]><[reason]>" dcommands_tempban_proc: type: procedure definitions: player|reason|expiration debug: false script: - inject dcommands_server_definitions - inject dcommands_ban_definitions - determine "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&nl><&color[<[ban.message.color]>]><[ban.message.temp.header]><&nl><&nl><&color[<[ban.message.color]>]>Reason: <&color[<[ban.value]>]><[reason]><&nl><&color[<[ban.message.color]>]><[ban.message.temp.footer]> <&color[<[ban.value]>]><[expiration].format>" dcommands_ban: type: command name: ban description: Permanently bans the desired player. usage: /ban [name] [reason] permission: dcommands.ban tab completions: 1: data: arguments: minimum: 2 maximum: 999 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player]> == : - narrate "<&[error]>You cannot ban yourself!" - stop - if <[player].has_flag[dcommands.banned]>: - narrate "<&[error]>This player is already banned!" - stop - inject dcommands_server_definitions - inject dcommands_ban_definitions - define reason ].substring[2]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[ban.message.color]>]>Player <[name]> has been permanently banned for <&dq><&color[<[ban.value]>]><[reason]><&color[<[ban.message.color]>]><&dq>." - announce to_console "<&color[<[ban.message.color]>]> has permanently banned <[name]> for <&dq><[reason]><&dq>." - flag <[player]> dcommands.banned - kick <[player]> reason:Disconnected - ban <[player]> reason:<[reason]> source: dcommands_tempban: type: command name: tempban description: Bans someone temporarily. usage: /tempban [name] [duration] [reason] permission: dcommands.tempban tab completions: 1: data: arguments: minimum: 3 maximum: 999 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player]> == : - narrate "<&[error]>You cannot tempban yourself!" - stop - define duration - if ].exists>: - if <[player].is_banned>: - narrate "<&[error]>This player is already banned!" - stop - inject dcommands_server_definitions - inject dcommands_ban_definitions - define reason ].substring[2]> - define duration ]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[ban.message.color]>]>Player <[name]> has been temporarily banned for <&color[<[ban.value]>]><[duration].formatted_words><&color[<[ban.message.color]>]>, for <&dq><&color[<[ban.value]>]><[reason]><&color[<[ban.message.color]>]><&dq>." - announce to_console "<&color[<[ban.message.color]>]> has temporarily banned <[name]> for <[duration].formatted_words>, for <&dq><[reason]><&dq>." - flag <[player]> dcommands.tempbanned expire:<[duration]> - kick <[player]> reason:Disconnected - ban <[player]> reason:<[reason]> source: expire:<[duration]> - else: - narrate "<&[error]>Invalid duration! Examples of valid durations:" - narrate "<&[error]>1d, 5m, 30s" dcommands_unban: type: command name: unban description: Unbans a banned player. usage: /unban [name] permission: dcommands.unban tab completions: 1: data: arguments: minimum: 1 maximum: 1 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_offline_player - if <[player].is_banned>: - flag <[player]> dcommands.banned:! - flag <[player]> dcommands.tempbanned:! - ban <[player]> remove - inject dcommands_server_definitions - define unban.message ].if_null[]> - define unban.player ].if_null[]>]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[unban.player]>]><[player].name> <&color[<[unban.message]>]>has been unbanned!" - if == null: - announce to_console "<&color[<[unban.message]>]><[player].name> has been unbanned by console." - else: - announce to_console "<&color[<[unban.message]>]> has unbanned <[player].name>." - else: - narrate "<&[error]>This player is not banned!" dcommands_inject_offline_player: type: task debug: false script: - define inject_player_color ].if_null[]> - define name - define player ].if_null[null]> - if <[player]> == null || <[player].name> != <[name]>: - narrate <&color[<[inject_player_color]>]> - stop dcommands_invsee: type: command name: invsee description: Looks at the desired player's inventory. Works with offline players. usage: /invsee [name] permission: dcommands.invsee tab completions: 1: data: arguments: minimum: 1 maximum: 1 debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - if <[player]> == : - inventory open d: - stop - narrate "<&[warning]>Opening <[player].name>'s inventory.." - inventory open d:<[player].inventory> dcommands_enderchest: type: command name: enderchest description: Opens someone's enderchest. If no name given, opens yours. Works with offline players. usage: /enderchest (name) permission: dcommands.enderchest aliases: - ec - echest tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - if : - inventory open d: - stop - inject dcommands_inject_player - if <[player]> == : - inventory open d: - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - narrate "<&[warning]>Opening <[player].name>'s enderchest.." - inventory open d:<[player].enderchest> dcommands_private: type: command name: tell description: Sends private messages to another player. usage: /tell [player] [message] permission: dcommands.tell aliases: - msg - message tab completions: 1: data: arguments: minimum: 2 debug: false script: - inject dcommands_inject_player - define error.color ].if_null[]> - if < : - narrate <&color[<[error.color]>]> - narrate <&color[<[error.color]>]> - stop - define receiver <[player]> - define sender - if <[sender]> == <[receiver]>: - narrate <&color[<[error.color]>]> - stop - define message ]> - flag <[sender]> dcommands.private:<[receiver]> - flag <[receiver]> dcommands.private:<[sender]> - define private.message ].if_null[]> - define private.sender ].if_null[]> - define private.receiver ].if_null[]> - narrate "<&7>[<&color[<[private.sender]>]><[sender].name> <&7>⇒ <&color[<[private.receiver]>]>You<&7>]<&color[<[private.message]>]><[message]>" targets:<[receiver]> - narrate "<&7>[<&color[<[private.receiver]>]>You <&7>⇒ <&color[<[private.sender]>]><[receiver].name><&7>]<&color[<[private.message]>]><[message]>" targets:<[sender]> - announce to_console "<&color[<[private.sender]>]><[sender].name> <&7>-<>> <&color[<[private.receiver]>]><[receiver].name><&7>:<&color[<[private.message]>]><[message]>" dcommands_private_reply: type: command name: r description: Replies to the latest message received. usage: /r [message] permission: dcommands.reply tab completions: 1: debug: false script: - define error ].if_null[]> - if !: - narrate <&color[<[error]>]> - stop - define receiver - define sender - if !<[receiver].is_online>: - narrate <&color[<[error]>]> - stop - if : - narrate <&color[<[error]>]> - stop - define message - flag <[sender]> dcommands.private:<[receiver]> - flag <[receiver]> dcommands.private:<[sender]> - define private.message ].if_null[]> - define private.sender ].if_null[]> - define private.receiver ].if_null[]> - narrate "<&7>[<&color[<[private.sender]>]><[sender].name> <&7>⇒ <&color[<[private.receiver]>]>You<&7>]<&color[<[private.message]>]> <[message]>" targets:<[receiver]> - narrate "<&7>[<&color[<[private.receiver]>]>You <&7>⇒ <&color[<[private.sender]>]><[receiver].name><&7>]<&color[<[private.message]>]> <[message]>" targets:<[sender]> - announce to_console "<&color[<[private.sender]>]><[sender].name> <&7>-<>> <&color[<[private.receiver]>]><[receiver].name><&7>:<&color[<[private.message]>]><[message]>" dcommands_reply_cleaner: type: world debug: false events: on player quits: - flag dcommands.private:! dcommands_clearchat: type: command name: clearchat description: Cleans up the chat, leaving a custom message behind. usage: /clearchat permission: dcommands.clearchat tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - announce <&nl.repeat[100]> - inject dcommands_server_definitions - define message - define color ].if_null[]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&color[<[color]>]> <[message]>" - announce to_console "<&color[<[color]>]>Chat was cleared by ." dcommands_dcommands: type: command name: dcommands description: Lists all available dCommands. usage: /dcommands permission: dcommands.dcommands tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - define commands - define path - define dcommands.disabled <[commands].filter[data_key[enabled].not]> - define dcommands.raw <[commands].filter[relative_filename.equals[<[path]>]].exclude[<[dcommands.disabled]>]> - define dcommands.name <[dcommands.raw].parse[data_key[name]]> - define dcommands.header.text - define dcommands.header.color ].if_null[]> - define dcommands.separator.symbol - define dcommands.separator.color ].if_null[]> - define dcommands.commands ].if_null[<[dcommands.header.color]>]> - narrate <&color[<[dcommands.header.color]>]><[dcommands.header.text]> - narrate "<&color[<[dcommands.separator.color]>]><[dcommands.separator.symbol]> <&color[<[dcommands.commands]>]><[dcommands.name].alphabetical.separated_by[<&nl><&color[<[dcommands.separator.color]>]><[dcommands.separator.symbol]> <&color[<[dcommands.commands]>]>]>" - if : - if : - if <[dcommands.disabled].is_empty>: - stop - narrate "<&7>Disabled dCommands:" - narrate "<&8><[dcommands.separator.symbol]> <&7><[dcommands.disabled].parse[data_key[name]].alphabetical.separated_by[<&nl><&8><[dcommands.separator.symbol]> <&7>]>" dcommands_ban_definitions: type: task debug: false script: - define ban.message.perma - define ban.message.temp.header - define ban.message.temp.footer - define ban.message.color ].if_null[<[server.color]>]> - define ban.value ].if_null[]> dcommands_server_definitions: type: task debug: false script: - define server.prefix - define server.suffix - define server.name - define server.color ].if_null[]> dcommands_gmc: type: command name: gmc description: Creative mode shortcut. usage: /gmc (player) permission: dcommands.gmc tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define color ].if_null[]> - if : - if == creative: - stop - else: - adjust gamemode:creative - narrate <&color[<[color]>]> - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:creative - narrate <&color[<[color]>]> - stop - if <[player].gamemode> == creative: - stop - else: - adjust <[player]> gamemode:creative - narrate "<&color[<[color]>]>Set <[player].name>'s gamemode to creative." - narrate <&color[<[color]>]> targets:<[player]> dcommands_gms: type: command name: gms description: Survival mode shortcut. usage: /gms (player) permission: dcommands.gms tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define color ].if_null[]> - if : - if == survival: - stop - else: - adjust gamemode:survival - narrate <&color[<[color]>]> - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:survival - narrate <&color[<[color]>]> - stop - if <[player].gamemode> == survival: - stop - else: - adjust <[player]> gamemode:survival - narrate "<&color[<[color]>]>Set <[player].name>'s gamemode to survival." - narrate <&color[<[color]>]> targets:<[player]> dcommands_gmsp: type: command name: gmsp description: Spectator mode shortcut. usage: /gmsp (player) permission: dcommands.gmsp tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define color ].if_null[]> - if : - if == spectator: - stop - else: - adjust gamemode:spectator - narrate <&color[<[color]>]> - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:spectator - narrate <&color[<[color]>]> - stop - if <[player].gamemode> == spectator: - stop - else: - adjust <[player]> gamemode:spectator - narrate "<&color[<[color]>]>Set <[player].name>'s gamemode to spectator." - narrate <&color[<[color]>]> targets:<[player]> dcommands_gma: type: command name: gma description: Adventure mode shortcut. usage: /gma (player) permission: dcommands.gma tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define color ].if_null[]> - if : - if == adventure: - stop - else: - adjust gamemode:adventure - narrate <&color[<[color]>]> - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - inject dcommands_inject_player - if <[player]> == : - adjust gamemode:adventure - narrate <&color[<[color]>]> - stop - if <[player].gamemode> == adventure: - stop - else: - adjust <[player]> gamemode:adventure - narrate "<&color[<[color]>]>Set <[player].name>'s gamemode to adventure." - narrate <&color[<[color]>]> targets:<[player]> dcommands_heal: type: command name: heal description: Heals yourself or another player. usage: /heal (player) permission: dcommands.heal tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define heal.message.self - define heal.message.color ].if_null[]> - define heal.numbers ].if_null[]> - define heal.separator.symbol - define heal.separator.color ].if_null[<[heal.message.color]>]> - if : - define health - define maxhealth - adjust fire_time:1t - heal - narrate <&color[<[heal.message.color]>]><[heal.message.self]> - narrate "<&color[<[heal.numbers]>]><[health]> <&color[<[heal.separator.color]>]><[heal.separator.symbol]> <&color[<[heal.numbers]>]><[maxhealth]>" - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - inject dcommands_inject_player - if <[player]> == : - define health - define maxhealth - adjust fire_time:1t - heal - narrate <&color[<[heal.message.color]>]><[heal.message.self]> - narrate "<&color[<[heal.numbers]>]><[health]> <&color[<[heal.separator.color]>]><[heal.separator.symbol]> <&color[<[heal.numbers]>]><[maxhealth]>" - stop - else: - define heal.message.another.theirs - define heal.message.another.yours - define health <[player].health.round_to_precision[0.5]> - define maxhealth <[player].health_max> - heal <[player]> - adjust <[player]> fire_time:1t - narrate "<&color[<[heal.message.color]>]><[heal.message.another.yours]> <[player].name>!" - narrate <&color[<[heal.message.color]>]><[heal.message.another.theirs]> targets:<[player]> - narrate "<&color[<[heal.numbers]>]><[health]> <&color[<[heal.separator.color]>]><[heal.separator.symbol]> <&color[<[heal.numbers]>]><[maxhealth]>" dcommands_feed: type: command name: feed description: Feeds yourself or another player. usage: /feed (player) permission: dcommands.feed tab completions: 1: data: arguments: minimum: 0 maximum: 1 debug: false script: - inject dcommands_inject_arguments - define feed.color ].if_null[]> - define feed.message.self - define feed.message.another - if : - feed - narrate <&color[<[feed.color]>]><[feed.message.self]> - stop - if !: - narrate "<&[error]>You don't have permission to do this!" - stop - inject dcommands_inject_player - if <[player]> == : - feed - narrate <&color[<[feed.color]>]><[feed.message.self]> - stop - else: - feed <[player]> - narrate <&color[<[feed.color]>]><[feed.message.another]> targets:<[player]> dcommands_vanish: type: command name: vanish description: Makes yourself invisible and invulnerable. usage: /vanish | invis | v permission: dcommands.vanish aliases: - invis - v tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - define color ].if_null[]> - if : - narrate <&color[<[color]>]> - adjust visible:false - adjust invulnerable:true - else: - narrate <&color[<[color]>]> - adjust visible:true - adjust invulnerable:false dcommands_fly: type: command name: fly description: Allows the user to fly, even in survival mode. usage: /fly permission: dcommands.fly tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - define color ].if_null[]> - if !: - narrate <&color[<[color]>]> - adjust can_fly:true - else: - narrate <&color[<[color]>]> - adjust can_fly:false dcommands_inject_arguments: type: task debug: false script: - definemap inject_argument_color: not_enough: ].if_null[]> too_many: ].if_null[]> command_info: usage: ].if_null[]> description: ].if_null[]> message: ].if_null[]> - define minarg - define maxarg - define single - if <[single]> != null: - if !: - narrate <&color[<[color.too_many]>]> - inject dcommands_inject_message - stop - else: - if <[minarg]> == null || <[maxarg]> == null: - narrate "<&4>Invalid minimum or maximum argument count! Contact the server developer." - stop - if < <[minarg]>: - narrate <&color[<[inject_argument_color.not_enough]>]> - inject dcommands_inject_message - stop - if > <[maxarg]>: - narrate <&color[<[inject_argument_color.too_many]>]> - inject dcommands_inject_message - stop dcommands_inject_message: type: task debug: false script: - narrate <&color[<[inject_argument_color.command_info.usage]>]> - narrate <&color[<[inject_argument_color.command_info.description]>]> - define message - if <[message]> != null: - narrate <&color[<[inject_argument_color.command_info.message]>]><[message]> dcommands_inject_player: type: task debug: false script: - define inject_player_color ].if_null[]> - define name - define player ].if_null[null]> - if <[player]> == null || <[player].name> != <[name]>: - narrate <&color[<[inject_player_color]>]> - stop dcommands_smite: type: command name: smite description: Spawns lightning bolts on whoever you want. Use high quantities at your own risk. usage: /smite [player] (quantity) (delay) permission: dcommands.smite tab completions: 1: data: arguments: minimum: 1 maximum: 3 message: Delay is given in seconds. debug: false script: - inject dcommands_inject_arguments - inject dcommands_inject_player - define quantity - if !<[quantity].is_decimal>: - narrate "<&[error]>Quantity must be a number!" - stop - define delay - if !<[delay].is_decimal>: - narrate "<&[error]>Delay must be a number!" - stop - define delay ]> - repeat <[quantity]>: - if : - narrate <&color[].if_null[]>]> targets:<[player]> - strike <[player].location> - wait <[delay]> dcommands_godmode: type: command name: godmode description: Turns godmode on and off. usage: /godmode | god aliases: - god - invulnerable permission: dcommands.godmode tab completions: 1: data: arguments: single: true debug: false script: - inject dcommands_inject_arguments - definemap godmodecolor: on: ].if_null[]> off: ].if_null[]> - if !: - narrate <&color[<[godmodecolor.on]>]> - adjust invulnerable:true - else: - narrate <&color[<[godmodecolor.off]>]> - adjust invulnerable:false dcommands_speed: type: command name: speed description: Changes your walking or flying speed. Default speed for both is 1. usage: /speed [fly | walk] (speed) permission: dcommands.speed tab completions: 1: fly|walk 2: data: arguments: minimum: 1 maximum: 2 debug: false script: - inject dcommands_inject_arguments - choose : - case walk: - define type walk_speed - define msg Walk - case fly: - define type fly_speed - define msg Flying - default: - inject dcommands_inject_message - stop - if == 1: - choose <[msg]>: - case Walk: - narrate "<&[base]>Your walking speed is set at <&[emphasis]><&[base]>!" - case Flying: - narrate "<&[base]>Your flying speed is set at <&[emphasis]><&[base]>!" - default: - narrate "<&[error]>If you saw this message, the author did a fuckie wuckie somewhere! Please contact!" - else: - define speed - if !<[speed].is_decimal>: - narrate "<&[error]>Speed input must be a number!" - stop - define speed <[speed].round_to_precision[0.1]> - narrate "<&[warning]><[msg]> speed changed to <[speed]>" - adjust <[type]>:<[speed].div[10]>