advancedspawnprotection

last built 3 months ago
Build #22
By downloading this file, you agree to our license terms.
Source: github.com
License: MIT
Maintainer: sharkbound
This plugin does not compile with the latest version of RocketMod.
Contact the author and kindly ask him to update this plugin or consider fixing it on GitHub.

The RocketMod team curates a dozen of community plugins and could need your support.
Consider a donation to RocketMod and sponsor your favourite plugins or contribute code to them.

AdvancedSpawnProtection

Change Log:
added EnsureGodmodeWhileProtected config setting to attempt to fix issue with regions plugin

General Info:

Gives players spawnprotection when they respawn or connect to the server.
By default it also gives them vanish for a few seconds after spawning or connecting, the amount of seconds vanish is given for can be set in the config as well as protection seconds.
Protection also cancels if they equip any items (can be disabled in the config).
Protection on join can also be disabled or enabled in the config.
Protection also cancels by default if the player is in a vehicle with any others, also if its enabled in the config protected players vehicles they are in will be auto repaired if the vehicle takes any damage (it will only be auto-repaired if its only that player in the vehicle).
ForceDequipWhileProtected: Forces the player to dequip whatever they equipted while under protection, default config value: false.
If Enabled this will disable protection canceling if they try to equip anything also since it will just make them un-equip anything they try to equip
CancelOnBedSpawn: Cancels the players spawn protection if they spawn at their bed
NOTE: Add the your current set vanish delay in the config file to the MaxProtectionVanishTime (the MaxProtectionVanishTime has to be a whole number, if you add the vanish delay to it and its like 1.2 it will cause a error when the plugin loads, round it up if you need to).

 

Commands:

  • /pstop <player> : Manually stops protection on the specificed player,
    Permission: <Permission Cooldown=”0″>stopprot</Permission>
  • /pstart <player> : Manually enables protection on a player,
    Permission:  <Permission Cooldown=”0″>startprot</Permission>
  • /toggleprotection : enables / disables the command caller receiving spawn protection when they respawn
    Permission:  <Permission Cooldown=”0″>toggleprotection</Permission>


IF YOU USE CUSTOM SPAWN POINTS SET SpawnPositionGetDelay TO 200 OR SO MILLISECONDS HIGHER THAN THE TELEPORT DELAY SET IN CUSTOM SPAWN POINTS CONFIG FILE!

 

If you would like to donate to support me you can do it through paypal Here

Default configuration


<?xml version="1.0" encoding="utf-8"?>
<SpawnProtectionConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <GiveVanishWhileProtected>true</GiveVanishWhileProtected>
  <CancelProtectionOnEquip>true</CancelProtectionOnEquip>
  <CancelProtectionIfInVehicleWithOthers>true</CancelProtectionIfInVehicleWithOthers>
  <CancelOnBedRespawn>true</CancelOnBedRespawn>
  <GiveProtectionOnJoin>false</GiveProtectionOnJoin>
  <GiveProtectionOnRespawn>true</GiveProtectionOnRespawn>
  <AutoRepairProtectedPlayersVehicles>true</AutoRepairProtectedPlayersVehicles>
  <SendProtectionMessages>true</SendProtectionMessages>
  <ForceDequipWhileProtected>false</ForceDequipWhileProtected>
  <EnableProtectionBasedOnDist>false</EnableProtectionBasedOnDist>
  <DisableProtectionBasedOnDist>false</DisableProtectionBasedOnDist>
  <EnsureGodmodeWhileProtected>false</EnsureGodmodeWhileProtected>
  <ProtDisableDist>100</ProtDisableDist>
  <ProtEnableDist>100</ProtEnableDist>
  <SpawnPositionGetDelay>1100</SpawnPositionGetDelay>
  <ProtectionTime>30</ProtectionTime>
  <MaxProtectionVanishTime>6</MaxProtectionVanishTime>
  <ProtectionVanishDelayMilliseconds>1000</ProtectionVanishDelayMilliseconds>
  <ProtectionMessageColor>Yellow</ProtectionMessageColor>
  <CommandMessageColor>Green</CommandMessageColor>
  <WhitelistedItems>
    <ID>65534</ID>
  </WhitelistedItems>
  <NoSpawnProtection>
    <steamid>18446744073709551614</steamid>
  </NoSpawnProtection>
</SpawnProtectionConfig>

Default english translation


<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Translation Id="prot_started" Value="You have spawn protection for {0} seconds!" />
  <Translation Id="canceled_item" Value="Your spawn protection expired because you equipted a item!" />
  <Translation Id="expired" Value="Your spawn protection expired!" />
  <Translation Id="canceled_veh" Value="Your spawn protection expired because you are in a vehicle with others!" />
  <Translation Id="admin_prot_enabled" Value="Enabled protection on {0}!" />
  <Translation Id="admin_prot_disabled" Value="Disabled protection on {0}!" />
  <Translation Id="usage_start" Value="Correct command usage: /pstart &lt;player&gt;" />
  <Translation Id="usage_stop" Value="Correct command usage: /pstop &lt;player&gt;" />
  <Translation Id="noplayer" Value="Player '{0}' not found!" />
  <Translation Id="canceled_punch" Value="Your spawn protection expired because you punched!" />
  <Translation Id="canceled_dist" Value="Your protection has expired because of moving away from spawn!" />
  <Translation Id="canceled_bedrespawn" Value="You were not giving spawnprotection due to spawning at your bed" />
  <Translation Id="protection_excluded" Value="You have disabled spawnprotection for yourself, do /toggleprotection to enable again" />
  <Translation Id="toggled_protection_on" Value="You will now receive spawn protection" />
  <Translation Id="toggled_protection_off" Value="You will no longer receive spawn protection" />
</Translations>

Commands and permissions


Git changelog


2f8293de29d0799 2019-05-18 02:00:55

updated libs

    68bfd5898063c8d 2019-05-16 00:46:53

    Fixed.

      a6f065b0bb22a04 2017-08-24 19:03:00

      trying a fix for glitched perma godmode with region's godmode flaged regions

        7de05f83d608d41 2017-08-10 17:41:24

        updated libs

          be16865f9dc6bef 2017-05-26 02:56:58

          added /toggleprotection to disable/enable protecton for yourself

            a2efff7e9d164ab 2017-04-24 19:47:42

            got a working bedspawncheck added

              b31d6038da43753 2017-04-23 03:44:00

              removed post build command

                0083c275cb64968 2017-04-23 03:38:44

                added CancelOnBedRespawn config option

                  8e1639e3c89879d 2017-01-25 22:00:04

                  added ForceDequipWhileProtected config option

                    a314e3659f2d188 2017-01-17 22:03:05

                    added config options for disabling/enabling protection based on distance

                      30e88137786be41 2017-01-07 20:20:04

                      updated libs

                        caf0ecf733a1170 2016-12-30 02:01:50

                        added SendProtectionMessages config option

                          faed1a956d831fe 2016-12-28 05:09:46

                          added item whitelisting, whitelisted items will not cancel protection when equipted

                            0f05070797c9daf 2016-12-19 23:22:19

                            added to where protection will cancel if you punch

                              f16b484d9aeaaf4 2016-12-12 20:16:07

                              added GiveProtectionOnRespawn config option

                                eb2ddbb4cf76ed2 2016-12-06 21:36:36

                                added protection vanish delay in config

                                  818bb4f7d15724e 2016-11-26 22:00:57

                                  added config option to have protection cancel if player is in a vehicle with others

                                    dc1bbfc0f1deaef 2016-11-26 21:03:40

                                    changed default protection vanish time

                                      48fac00905d89c0 2016-11-26 20:49:16

                                      changed assembly name to AdvancedSpawnProtection and added message color option in config

                                        087757430203c41 2016-11-18 22:21:48

                                        fixes and improvements

                                          6542836db241747 2016-11-16 05:58:58

                                          trying a fix for vanish not workings from protection

                                            1ae910bd84da98c 2016-11-15 22:30:02

                                            First commit, also greatly improved code for spawnprotection