BCProtect

BCProtect provides protection against grief to ByteCart rail networks.

This plugin works simply as an addon to ByteCart and adds a permission layer to various ingame operations related to ByteCart network.

Installation

You must install SQLibrary plugin to use BCProtect.

Put BCProtect.jar and sql-library.jar in the plugin folder where you have already installed ByteCart.jar and restart your server twice.

Usage

To protect a region against grief, run the ByteCart command bcupdater region n where n is the region number you want to protect (n=0 for the backbone). You must start the updater storage cart form the ring n.0.0, i.e upstream from the sign BC8010 (or BC8020 for the backbone) with address n.0.0. You must repeat the process for each region of your network.

To protect stations and subrings you must run bcupdater local n as well.

New networks will be automatically protected during initial configuration if BCProtect was installed.

Currently the effect of the plugin is to check for a valid permission when a player wants to place or break a block in the surroundings of the Bytecart network: components and rails between components.

The permission checked is in the format bytecart.BCXXX.permString

where BCXXX is one among:

  • BC8010 for L1 routers
  • BC8020 for L2 routers and connected tracks
  • BC9001 for stations
  • BC9256, BC9128, BC9064, BC9032, BC9016, BC9008, BC9004, BC9002 for subrings

and permString is one among:

  • canbuild to allow players to build inside the area the network
  • openchest to allow players to open cart inventories while in the network
  • canAccess to allow players to enter the network without being in a cart, or to exit a cart during a trip
  • enableMobs to allow mobs to spawn, explode, target someone, teleport, collide or damage the network. Set to false to get rid of mobs.
  • enablePistons to allow pistons to work in the network, or push something on the track
  • createCart to allow anyone to put a cart on track. This should be allowed only in stations.
  • destroyCart to allow anyone to destroy a cart while in the network.

If the player does not have the required permission, an error message will be displayed in its chat window with the description of the missing permission.

Permissions

There is no permission needed to use BCProtect other than the permission to execute the bcupdater command and to give ByteCart permissions to players.

Permissions needed to modify an existing ByteCart network are specific to each part of the network. The error message give the information about the permission needed for a specific part of the network.

Permissions needed to use the network are not affected.

Protection removal

Each area is associated with a reference block that you must delete to remove the protection. This enables easy management of protected area since area is deleted when you remove the component.

The reference blocks are:

  • for routers, the chest above the router.
  • for stations, the station sign
  • for subrings, the BC9XXX sign. The input BC9XXX sign is also the reference point for the track of the subring.
  • for main rings the first BC8010 sign that you meet when turning anticlockwise, i.e a track is protected by the sign placed on the other side near the router.

To reset a world protection, remove manually the file with the name of your world and extension '.db' you will find in the plugin folder.

Source code

The source code is available here


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files