PvP command blocker for tShock

The PvP command blocker plugin for tShock blocks commands for players while they are in PvP mode if they do not have permission.

Teams:
toggleblock - enables / disables the block (disabled by default)
reloadexempts - reloads config
blockreg - allows users to block / unblock regions as well as enable them

Permissions:
pvp.block - access to / toggleblock command and immunity to its effects
pvp.reload - access to the / reloadexempts command
pvp.region - access to the / blockreg command

Usage:
/ toggleblock all / region - if no parameters, then by default everything.
“Everyone” means that everyone in PvP will not be able to use commands unless the command is added to the exception in the config or the users have pvp.block permission.
“Region” means that everyone inside the blocked region will not be able to use the commands unless the command is added to the exception in the config or the users have pvp.block permission.
/ reloadexempts - reload the config with commands added to the exceptions, and reload the locked region config.
/ blockreg add / del / toggle region name (optional [true / false])
- add parameter (add): turns the specified region into a blockable one. Works only if the region actually exists (via the / region define command).
- remove parameter (del): removes the specified region from the list of blocked regions. Works only if the region is lockable and it exists (via the / region define command).
- enable parameter (toggle): enables / disables the existing locked region.

Config settings:

Note: # is a comment, do not add it to the config, IT WILL NOT WORK!

PvPCmdConfig.json

{
  "toggleAll": false,                  #блокировать команды в PvP везде
  "toggleRegions": false,          #блокировать команды в заданных регионах
  "ExemptCommands": [          #список команд, которые можно использовать
    "/p",
    "/me",
    "/help",
    "/party",
    "/motd",
    "/aliases",
    "/playing",
    "/rules"
  ]
}

PvPRegions.json

{
  "RegionConfiguration": [
    {
      "regionList": [ 
        {
          "Name": "example",   #название региона, должно совпадать с названием региона в игре, с учетом регистра букв.
          "BlockCmds": false                 #будут или не будут блокироваться команды, пока игрок в данном регионе.
        }#,
#to make more:
     #{
        #"Name": "example2",
        #"BlockCmds": false
     #}
     ]
    }
  ]
}

Download

Download
TerrariaGo - Everything for Terraria (Terraria) free download