###########################################################################################################################
#                                                                                                                         #
#                                  TravelGates Plugin v1.7.1 by Ghomerr [1597]                                            #
#                                                                                                                         #
###########################################################################################################################


This plugin is multilangual and uses a configuration file. 
It should be compatible with Bukkit Builds #1185 & #1240 & #1317 & #1337. (no changes for this plugin)


###########################################################################################################################
#                                                                                                                         #
#                                                 SETUP FROM SCRATCH                                                      #
#                                                                                                                         #
###########################################################################################################################

Unzip the archive TravelGates-x.x.x.zip
Move the TravelGates-x.x.x.jar in your "plugins" directory (in the server directory)
Unzip the archive resources-x.x.x.zip
Create a directory named "TravelGates" in the previous "plugins" directory
Copy inside this directory the files : travelgates.conf file and the message_xx.lang of your choice (or make your own, see the section "LANGUAGE FILE" below)
Configure the configuration file as you want (see the next section below for information)
Start your server and enjoy !

If you have already installed this plugin:
    Keep your TravelGates directory to save your configuration and the saved destinations.
    Remove the old TravelGates-x.x.x.jar and replace it by the new one.
    Replace the language file if messages have been updated.
    

###########################################################################################################################
#                                                                                                                         #
#                                                     CONFIGURATION FILE                                                  #
#                                                                                                                         #
###########################################################################################################################

The configuration file is "travelgates.conf" and has to be placed in the "TravelGates" directory in your plugins directory.
"TravelGates" directory is created automatically if it does not exist.
If this directory is missing, you'd have to create it yourself because this plugin will be disabled if data can't be stored.
Each missing parameter will be ignored and the default value will be used. (See the example configuration file)

Configuration parameters:
    language                : set the languages of the players's messages. Has to be the same value as the message file name. (Example : language=en -> messages_en.lang)
    usepermissions          : (true/false) use PermissionsBukkit or PermissionsEx or Permissions 2x/3x (in that order, depending on what plugin you have)
    teleportwithsign        : (true/false) use the sign to teleport (right-click on a sign or target a sign while typing /tg)
    teleportwithportal      : (true/false) use Nether Portals substitution
    debug                   : (true/false) use to enable the debug mode when the plugin is loading.
    clearallinventory       : (true/false) use to clear the armor content when the "i" option is set to a destination


###########################################################################################################################
#                                                                                                                         #
#                                                     LANGUAGE FILE                                                       #
#                                                                                                                         #
###########################################################################################################################

You have to use a messages_xx.lang file corresponding to your language defined in the configuration file. 
The "xx" has to match with the value in the configuration file.
The messages file has to be placed in the TravelGates directory.
If the language file is missing, the default language field will be used, stored directly inside the plugin.


###########################################################################################################################
#                                                                                                                         #
#                                              PERMISSIONS CONFIGURATION                                                  #
#                                                                                                                         #
###########################################################################################################################

Permissions Compatibility : supports PermissionsBukkit, PermissionsEx and Permissions 2x/3x plugins (they will be searched in this order)
Permissions nodes are the followings:
For admins:
        travelgates.add       # Add a Destination
        travelgates.del       # Remove a Destination
        travelgates.admintp   # Teleport to an Admin's Destination
        travelgates.save      # Request instant save of destinations
        travelgates.options   # Update destination's options
        travelgates.debug     # Toggle the Debug Mode
        travelgates.worlds    # Toggle the Debug Mode

For users:
        travelgates.teleport   # Teleport a player a sign or the command /tg
        travelgates.portal     # Teleport a player using a Nether Portal
        travelgates.list       # View the list of Destinations
        travelgates.details    # View the detailed list of Destinations
        travelgates.loc        # View the location of the Destination
        travelgates.name       # View the name of the Destination where player is standing
        travelgates.sign       # Allow player to update the Portal Sign
        travelgates.help       # View Help


###########################################################################################################################
#                                                                                                                         #
#                                                 HOW TO USE THE PLUGIN                                                   #
#                                                                                                                         #
###########################################################################################################################    
    
Plugin in-game usage:
    Main command is "/travelgates" but you can use the alias "/tg".
    All commands and destinations are case insensitive. (you can enter destinations without regarding if your destinations is lower case, UPPER CASE or bOtH !)
    
    Admin commands:
    /tg add <destination> [-options] : add a destination. By default, the destination is the current players's Location AND direction (North/South/East/West) ! (Options are described below)
    /tg del <destination> : delete a destination
    /tg save : Force saving destinations
    /tg debug : Toggle the debug mode
    /tg options <destination> [-options] : update desintation's options
    /tg update <destination> [-options] : same as /tg options, more convenient
    /tg worlds : display available loaded worlds (to use with the -p option)
   
   Users commands:
    /tg list : display all destinations available to the player.
    /tg details : display all destinations, their locations and options to the player.
    /tg loc <destination> : display the location of the destination.
    /tg name : display the name of the location where the player is standing.
    /tg help : display short help of the plugin.
    /tg <destination> : teleport player to the destination if he is standing on an existing location.
    
    Other teleportation means:
    /tg while targetting a sign containing the name of an existing destination : do the same as /tg <destination>. The destination can be written at any line of the sign.
    Right click on a "TravelGates'" sign containing on a line [TG] or [TRAVELGATES] (case insensitive) and on another line or on the same line (order doesn't matter) the name of an existing destination : do the same as /tg <destination>.
    Use Nether Portals : Place a "TravelGates'" sign (see above) on a Nether Portal with the "-ON-" state (defined in language file), updated with a lever or directly by editing the sign, and use the Portal as usual. The sign has to be placed on an obsidian portal bloc facing the head of the player.
    
Options in "add" or "options|update" commands:
    a = admin teleport only (only OP or Allowed players can travel to this destination)
    i = clear inventory while travelling to a destination (if the configuration "clearallinventory" is set to true, whole armor and the item wielded will be cleared too)
    s = instant save when adding a new destination or updating the options of the given destination
    p = set the position of your destination as following : -p(world,x,y,z) or -p(x,z,y). Conditions: -30M < x,z < +30M and 0 < y < MaxHeight and y = ? -> highest block
        (These commands with the -p option do not check the 'y' coordinate if you enter it. Use a "good" 'y' value. Use "?" if you don't know the max height.)
        (Becareful with negative coordinates. x=-5, for instance, while teleport you if your are from x=-4 to x=-5.)
        (When you type the height with this option, it will be decreased by one, because the displayed "y" value is higher than the value you can be teleported)