apartments_command_apartmentaddmember: debug: false type: command name: apartmentaddmember description: Add a member to the apartment you are currently in. usage: /apartmentaddmember (player) aliases: - aptaddmember - aptam permission: apartments.command.apartmentaddmember tab completions: 1: script: - if != player: - narrate "<&c>Please run this command as a player." - stop - define apartment ]> - if <[apartment]> == null: - narrate "<&c>You can only use this command inside apartments." - stop - define owner ]> - if != <[owner]>: - narrate "<&c>You do not own this apartment!" - stop - if <= 0: - narrate "<&c>Invalid use. Please try / (player)" - stop - define target ].if_null[null]> - if <[target]> == null: - narrate "<&c>A player with the username could not be found." - stop - if <[target]> == : - narrate "<&c>You cannot add yourself as a member!" - stop - run apartments_add_member def.apartment:<[apartment]> def.member:<[target]> - narrate format:formats_prefix "<&a>Added <&7><[target].name> to your apartment (<&b>member<&7>)." apartments_command_apartmentaddmoderator: debug: false type: command name: apartmentaddmoderator description: Adds a moderator to the apartment you are currently in. usage: /apartmentaddmoderator (player) aliases: - aptaddmod permission: apartments.command.apartmentaddmod tab completions: 1: script: - if != player: - narrate "<&c>Please run this command as a player." - stop - define apartment ]> - if <[apartment]> == null: - narrate "<&c>You can only use this command inside apartments." - stop - define owner ]> - if != <[owner]>: - narrate "<&c>You do not own this apartment!" - stop - if <= 0: - narrate "<&c>Invalid use. Please try / (player)" - stop - define target ].if_null[null]> - if <[target]> == null: - narrate "<&c>A player with the username could not be found." - stop - if <[target]> == : - narrate "<&c>You cannot add yourself as a moderator!" - stop - run apartments_add_moderator def.apartment:<[apartment]> def.moderator:<[target]> - narrate format:formats_prefix "<&a>Added <&7><[target].name> to your apartment (<&6>moderator<&7>)." apartments_command_apartmentremoveaccess: debug: false type: command name: apartmentremoveaccess description: Removes all access for a player from the apartment you are currently in. usage: /apartmentremoveaccess (player) aliases: - aptremoveaccess - aptrm permission: apartments.command.apartmentremoveaccess tab completions: # TODO: use the procedural tab-complete to handle this correctly! 1: script: - if != player: - narrate "<&c>Please run this command as a player." - stop - define apartment ]> - if <[apartment]> == null: - narrate "<&c>You can only use this command inside apartments." - stop - define owner ]> - if != <[owner]>: - narrate "<&c>You do not own this apartment!" - stop - if <= 0: - narrate "<&c>Invalid use. Please try / (player)" - stop - define target ].if_null[null]> - if <[target]> == null: - narrate "<&c>A player with the username could not be found." - stop - if <[target]> == : - narrate "<&c>You cannot remove your own access!" - stop - if <[target].location.in_region[<[apartment].id>]>: - run apartments_end_edit def.player:<[target]> - run apartments_remove_access def.apartment:<[apartment]> def.member:<[target]> - narrate format:formats_prefix "<&c>Removed <&7>member <[target].name> from your apartment." apartments_command_apartmenteditmode: debug: false type: command name: apartmenteditmode description: Toggle edit mode for the apartment you are currently in. usage: /apartmenteditmode aliases: - apteditmode - editmode permission: apartments.command.apartmenteditmode tab completions: 1: script: - if != player: - narrate "<&c>Please run this command as a player." - stop # toggle off - if : - run apartments_end_edit def.player: - narrate format:formats_prefix "<&e>Exiting <&6>Edit Mode..." - stop # toggle on - define apartment ]> - if <[apartment]> == null: - narrate "<&c>You can only use this command inside apartments." - stop - define owner ]> - if != <[owner]>: - define access_level |]> - if <[access_level]> != moderator: - narrate "<&c>You must own this apartment or be an apartment moderator to enable editing here!" - stop - run apartments_begin_edit def.apartment:<[apartment]> def.player: - narrate format:formats_prefix "<&a>Entering <&6>Edit Mode..."