-
Notifications
You must be signed in to change notification settings - Fork 23
Plugin Goals
requires a resource (specified in a configuration document) to create a protected block with a certain 'durability' value. This 'durability' value is how many times the block can be destroyed by a player in game before it is removed from the game world.This value is held in a database and is cumulative (so if a block has a durability value of 100 and it is destroyed twice by creepers to remove it you must only destroy it the remaining 98 times.)
Protections for static blocks (cobblestone, wood, ect) will be controlled by two commands. Once command will allow the user to reinforce only one block, the user must specify a resource to use to protect the block and then select the block. Ideally this would be done by typing the command and then right clicking the block to protect with the resource to consume in hand. But if that proves difficult to implement you can simply run a text command and have the next placed block consume the resource. The second command for static blocks will be a toggle, where the user specifies a resource to consume and every block placed consumes that resource from their inventory until they toggle the command off or run out of the specified resource. Database values for static protected blocks do not need to store username only the durability value and location of the block.
Protection for blocks that users interact with is significantly more command complex. Like the protection command for single static blocks a method involving a command followed by right clicking on the chest, door, ect the user wishes to protect with resource in hand is ideal, but not critical. There will be a command for private, public, and group protections. Private protections can be accessed only by the creator, Public protections can be accessed by anyone, and group protections can be accessed by user specified groups of people. The current implementation of this is that each user has a list to which they can add and remove names, when they create a group block everyone on their list can access it, more granular control with multiple lists per player would be welcome but are not essential. Database entries for non-staic blocks will require the username of the user, and the type of protection. In the case of a group protection the user list will also be needed.
When a user right clicks on any protected block a message should be shown, in the case of static blocks it should be formatted as such.
block_type is [Poorly/decently/well/Excellently] reinforced with reinforcement_material
for user intractable blocks
door/chest/gate is [Poorly/decently/well/Excellently] locked with reinforcement_material
With Poorly=1%-25% of original Durability, Decently=26%-50%, Well=51%-75%, Excellently=76%-100%