SpawnSurance

Features

Now with integration into Vault!

SpawnSurance is a portmanteau of Spawn and Insurance.

The chief goal of SpawnSurance is to allow a player to not lose his stuff when he dies and respawns, often far away from his spawn point.

The primary function of SpawnSurance is to persist a player's inventory into a database when a player dies, and then to restore that inventory to the player upon respawn.

Naturally, such a wonderful effect should not be completely free, and each subsequent use should cost a little more each time.

In order to persist inventory, SpawnSurance first checks to see if the player is carrying the correct amount of the configurable item. By default, SpawnSurance uses rotten flesh as the cost item.

The cost of each subsequent use accelerates.

By default, SpawnSurance first costs 1 unit, then the next time 2 units, and caps out at 64 units. The initial rate, the rate of additional cost, and the maximum cost are all configurable.

Setting Up SpawnSurance for Vault Integration

Initially, SpawnSurance is configured for the default behavior, which is to use ROTTEN_FLESH as the payment.

To integrate with vault, use the command:

/spawnsurance set pay-source vault

Also, the default initial cost is 1, with an acceleration value of 1, and a maximum value of 64, which is likely a bit too cheap for use with an economy.

If you wanted to have a minimum cost of 1000 "dollars" and a maximum cost of 10000 "dollars" with a jump of 500 "dollars" for each use, you would configure like so:

/spawnsurance set minimum 1000

/spawnsurance set maximum 10000

/spawnsurance set acceleration 500

You will naturally know what is best for your server.

Using SpawnSurance

Using SpawnSurance is very simple.

Just die with the appropriate number of the cost item in the inventory, then respawn.

This requires a permission named spawnsurance.use, which defaults to true.

SpawnSurance User Commands

There are a number of chat commands that may be issued by a player.

Showing General Help

/spawnsurance

/spawnsurance help

These commands show general help for the commands of the plugin.

These commands do not check permissions.

Showing The Current Status of the Player's SpawnSurance

/spawnsurance check

This command reports several things.

First, it reports if the player does not have the necessary permission to use spawnsurance.

Second, it reports whether or not the player has sufficient number of cost items to make use of spawnsurance.

Third, it reports the number of cost items currently necessary to activate spawnsurance.

This command requires the permission spawnsurance.use, which defaults to true.

This command will not work on the console, as there is no current player.

Retrieving the Current Player's Number of Claims

/spawnsurance get claims

This command retrieves the number of claims (times that SpawnSurance has been used) by the player.

The cost of SpawnSurance is (Minimum Cost) + (Accleration) * (Number of Claims), but clamped to be no greater than the maximum, but no less than the minimum, in that order.

This command requires the permission spawnsurance.use, which defaults to true.

This command will not work on the console, as there is no current player.

SpawnSurance Administration Commands

All of the functionality of administration commands for SpawnSurance fall into the "get" command and the "set" command, and they retrieve or set the various configuration details of SpawnSurance

In addition, using either of the two commands:

/spawnsurance get

/spawnsurance set

Will give help with the properties that can be used with either get or set.

These commands do not check permissions.

The "Get" Commands

/spawnsurance get material

This command retrieves the material currently used as a cost item for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance get minimum

This command retrieves the minimum cost for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance get maximum

This command retrieves the maximum cost for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance get acceleration

This command retrieves the acceleration for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance get claims (playername)

This command retrieves the number of claims for a particular player

This command requires the permission spawnsurance.admin.claims, which defaults to op.

/spawnsurance get pay-source

This command retrieves the current pay source

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance get message-enabled

This command retrieves the current enabled state of the spawnsurance message.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance get message-text

This command retrieves the current message text of the spawnsurance message.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

The "Set" Commands

/spawnsurance set material (MATERIAL_NAME)

This command will set the material for the cost item for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance set minimum (amount)

This command will set the minimum cost for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance set maximum (amount)

This command will set the maximum cost for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance set acceleration (amount)

This command will set the acceleration cost for SpawnSurance.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance set claims (playername) (amount)

This command will set the number of claims for a player.

This command requires the permission spawnsurance.admin.claims, which defaults to op.

/spawnsurance set pay-source (default|vault)

This command will set the current pay source. Valid values are default and vault. Any other value will be interpreted as default.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance set message-enabled (true|false)

This command will set the current enabled state of the spawnsurance message.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.

/spawnsurance set message-text (message text)

This command will set the current message text of the spawnsurance message.

This command requires the permission spawnsurance.admin.configuration, which defaults to op.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files