LaserHydra
Allows you to grant permissions or groups for a specific time

Supported Games

Timed Permissions allows you to grant permissions or groups for a specific time.

Donations

Please consider donating to support me and help me put more time into my plugins. You can donate, by clicking here.

Permissions

  • timedpermissions.use -- Allows player to use most of the commands
  • timedpermissions.advanced -- Allows player to use the timedpermissions_resetaccess & timedpermissions_ensureaccess.

Commands

This plugin provides universal chat and console commands. When using a command in the chat, prefix it with a forward slash: /

  • revokeperm <player|steamid> <permission> -- Revoke a timed permission from a player
  • grantperm <player|steamid> <permission> <time> -- Give a player a permission for a specific time
  • removegroup <player|steamid> <group> -- Remove a timed group from a player
  • addgroup <player|steamid> <group> <time> -- Add a player to a group for a specific time
  • pinfo [player|steamid] -- Show active timed permissions and groups of a player (can be used by non-admins without specifiying a target player)

Advanced Commands (require timedpermissions.advanced permission)

  • timedpermissions_resetaccess [yes] -- Reset all access data stored in Timed Permissions and create a backup of that data. Needs to be confirmed by passing yes as parameter.

Placeholders

These are placeholders used in the commands. They are to be replaced with a specific value when using a command.

  • <player|steamid> -- the name or Steam ID (64) of the player you're trying to target
  • [player|steamid] -- [optional] the name or Steam ID (64) of the player you're trying to target
  • <permission> -- the name of the permission you want to grant/revoke
  • <group> -- the name of the group you want to add the player to/remove the player from
  • <time> -- the duration of the permission/group formatted like '1d12h30m'
    Usage example: /grantperm LaserHydra timedpermissions.use 30d gives LaserHydra the permission timedpermissions.use for 30 days.
    • d = days
    • h = hours
    • m = minutes
  • [yes] -- text 'yes' needs to be given to confirm action

Configuration

{  
  "Wipe Data on New Save (Limited to Certain Games)": false  
}
  • Wipe Data on New Save (Limited to Certain Games) -- when set to true, automatically wipes the data

Localization

{  
  "Invalid Time Format": "Invalid Time Format: Ex: 1d12h30m | d = days, h = hours, m = minutes",  
  "No Permission": "You don't have permission to use this command.",  
  "Player Has No Info": "There is no info about this player.",  
  "Player Info": "Info about {player}:  Groups: {groups}  Permissions: {permissions}"
}

Developer Hooks

OnTimedPermissionGranted

Called right before timed permission is granted.No return behaviour.

void OnTimedPermissionGranted(string Id, string permission, TimeSpan duration)

OnTimedPermissionExtended

Called right before timed permission time is extended.No return behaviour.

void OnTimedPermissionExtended(string Id, string permission, TimeSpan duration)

OnTimedGroupAdded

Called right before the player is added to a group for a specific time.No return behaviour.

void OnTimedGroupAdded(string Id, string group, TimeSpan duration)

OnTimedPermissionExtended

Called right before timed group time is extended.No return behaviour.

void OnTimedGroupExtended(string Id, string group, TimeSpan duration)

MIT License


Copyright (c) 2019 LaserHydra


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.