PseudoKnight / Stargate-Bukkit

Spigot plugin to create and manage networks of Stargates
GNU General Public License v3.0
9 stars 5 forks source link

Description

Create gates that allow for instant-teleportation between large distances. Gates can be always-open or triggered; they can share a network or be split into clusters; they can be hidden on a network or accessible to everybody.

Background

This was originally TheDgtl's Bukkit port of the Stargate plugin for hMod by Dinnerbone. This fork updates it for modern versions of Spigot.

Permissions

stargate.use -- Allow use of all gates linking to any world in any network (Override ALL network/world permissions. Set to false to use network/world specific permissions)  
  stargate.world -- Allow use of gates linking to any world  
    stargate.world.{world} -- Allow use of gates with a destination in {world}. Set to false to disallow use.  
  stargate.network -- Allow use of gates on all networks  
    stargate.network.{network} -- Allow use of all gates in {network}. Set to false to disallow use.  

stargate.option -- Allow use of all options
  stargate.option.hidden -- Allow use of 'H'idden
  stargate.option.alwayson -- Allow use of 'A'lways-On
  stargate.option.private -- Allow use of 'P'rivate
  stargate.option.free -- Allow use of 'F'ree
  stargate.option.backwards -- Allow use of 'B'ackwards
  stargate.option.show -- Allow use of 'S'how
  stargate.option.nonetwork -- Allow use of 'N'oNetwork
  stargate.option.random -- Allow use of 'Random' gates

stargate.create -- Allow creating gates on any network (Override all create permissions)
  stargate.create.personal -- Allow creating gates on network {playername}
  stargate.create.network -- Allow creating gates on any network
    stargate.create.network.{networkname} -- Allow creating gates on network {networkname}. Set to false to disallow creation on {networkname}
  stargate.create.gate -- Allow creation of any gate layout
    stargate.create.gate.{gatefile} -- Allow creation of only {gatefile} gates

stargate.destroy -- Allow destruction gates on any network (Orderride all destroy permissions)
  stargate.destroy.personal -- Allow destruction of gates owned by user only
  stargate.destroy.network -- Allow destruction of gates on any network
    stargate.destroy.network.{networkname} -- Allow destruction of gates on network {networkname}. Set to false to disallow destruction of {networkname}

stargate.free -- Allow free use/creation/destruction of gates
  stargate.free.use -- Allow free use of Stargates
  stargate.free.create -- Allow free creation of Stargates
  stargate.free.destroy -- Allow free destruction of Stargates

stargate.admin -- Allow all admin features (Hidden/Private only so far)
  stargate.admin.private -- Allow use of Private gates not owned by user
  stargate.admin.hidden -- Allow access to Hidden gates not ownerd by user
  stargate.admin.reload -- Allow use of /sg reload

Default Permissions

stargate.use -- Everyone
stargate.create -- Op
stargate.destroy -- Op
stargate.option -- Op
stargate.free -- Op
stargate.admin -- Op

Instructions

Building a gate:

This is the default gate configuration. See the Custom Gate Layout section on how to change this.

    OO 
   O  O - These are Obsidian blocks. You need 10.
   O  O - Place a sign on either of these two blocks of Obsidian.
   O  O
    OO

Sign Layout:

The options are the single letter, not the word. So to make a private hidden gate, your 4th line would be 'PH'.

Gate networks:

Fixed gates:

Hidden Gates:

Using a gate:

Economy Support:

The latest version of Stargate has support for Vault. Gate creation, destruction and use can all have different costs associated with them. You can also define per-gate layout costs. The default cost is assigned in the config.yml file, while the per-gate costs re defined in the .gate files. To define a certain cost to a gate just add these lines to your .gate file:

usecost=5
destroycost=5
createcost=5
toowner=true

Custom Gate Layout

You can create as many gate formats as you want, the gate layouts are stored in plugins/Stargate/gates/.
The .gate file must be laid out a specific way, the first lines will be config information, and after a blank line you will lay out the gate format. Here is the default nether.gate file:

portal-open=NETHER_PORTAL
portal-closed=AIR
button=STONE_BUTTON
X=OBSIDIAN
-=OBSIDIAN

 XX 
X..X
-..-
X*.X
 XX 

The keys portal-open and portal-closed are used to define the material in the gate when it is open or closed. The key button is used to define the type of button that is generated for this gate. It must be a button material. X and - are used to define block types for the layout (Any single-character can be used, such as #).
In the gate format, you can see we use X to show where obsidian must be, - where the controls (Button/sign) are.
You will also notice a * in the gate layout, this is the "exit point" of the gate, the block at which the player will teleport in front of.

Configuration

default-gate-network - The default gate network
portal-folder - The folder your portal databases are saved in
gate-folder - The folder containing your .gate files
destroyexplosion - Whether to destroy a stargate with explosions, or stop an explosion if it contains a gates controls.
useeconomy - Whether or not to use Economy
createcost - The cost to create a stargate
destroycost - The cost to destroy a stargate (Can be negative for a "refund"
usecost - The cost to use a stargate
chargefreedestination - Enable to allow free travel from any gate to a free gate
freegatesgreen - Enable to make gates that won't cost the player money show up as green
toowner - Whether the money from gate-use goes to the owner or nobody
maxgates - If non-zero, will define the maximum amount of gates allowed on any network.
lang - The language to use (Included languages: en, de)
destMemory - Whether to set the first destination as the last used destination for all gates
ignoreEntrance - Set this option to true to not check the entrance of a gate on startup. This is a workaround for snowmen breaking gates.
handleVehicles - Whether or not to handle vehicles going through gates. Set to false to disallow vehicles (Manned or not) going through gates.
sortLists - If true, network lists will be sorted alphabetically.
protectEntrance - If true, will protect from users breaking gate entrance blocks (This is more resource intensive than the usual check, and should only be enabled for servers that use solid open/close blocks)
signColor: This allows you to specify the color of the gate signs. Valid colors:
verifyPortals: Whether or not all the non-sign blocks are checked to match the gate layout when an old stargate is loaded at startup.

debug: Whether to show massive debug output
permdebug: Whether to show massive permission debug output

Message Customization

It is possible to customize all of the messages Stargate displays, including the [Stargate] prefix. You can find the strings in plugins/Stargate/lang/en.txt.

If a string is removed, or left blank, it will not be shown when the user does the action associated with it. There are three special cases when it comes to messages, these are:

ecoDeduct=Spent %cost%
ecoRefund=Refunded %cost%
ecoObtain=Obtained %cost% from Stargate %portal%

As you can see, these three strings have %cost% and %portal% variables in them. These variables are fairly self-explanatory.

The full list of strings is as follows:

prefix=[Stargate] 
teleportMsg=Teleported
destroyMsg=Gate Destroyed
invalidMsg=Invalid Destination
blockMsg=Destination Blocked
denyMsg=Access Denied
destEmpty=Destination List Empty

ecoDeduct=Deducted %cost%
ecoRefund=Redunded %cost%
ecoObtain=Obtained %cost% from Stargate %portal%
ecoInFunds=Insufficient Funds

createMsg=Gate Created
createNetDeny=You do not have access to that network
createPersonal=Creating gate on personal network
createNameLength=Name too short or too long.
createExists=A gate by that name already exists
createFull=This network is full
createWorldDeny=You do not have access to that world
createConflict=Gate conflicts with existing gate

Changes

[Version 0.8.0.3] PseudoKnight fork