Creating Signs

OnSign Creation

Permissions

In order to create or break an OnSign sign, a player must have the following permission:

onsign.admin

Types of OnSign Signs

There are three types of signs a player can create, a "player" sign, a "top" sign, and a "shop" sign. A "player" sign will show information for a specified player. A "top" sign will show the top scoring players for the data specified, as collected by the OnTime plugin, such as time played, and votes cast. A "shop" sign will allow other players to purchase OnTime Rewards with "Points" or in-game money.

Creating an OnSign Sign

The player must simply place a sign (wall or post) and then edit the sign using the rules below:

Player Signs

Player signs are somewhat free form, as any of the following tokens can be placed on any line of the sign. A line can only have one token and cannot have any extra characters. Lines that do not contain a token can have any text desired. The list of tokens supported for a player sign are as follows. Note that ech token begins with a single "%".

%status To display player's current ONLINE or OFFLINE status
%loginlogout To display the date and time of the players last login when ONLINE, and last logout when OFFLINE
%lastlogin To display the date and time of the players last login when ONLINE or OFFLINE

%totalplay To display the player's total play time on the server
%todayplay To display the player's play time for the current day
%weekplay To display the player's play time for the current week
%monthplay To display the player's play time for the current month
%totalvote To display the player's total votes on the server
%todayvote To display the player's votes for the current day
%weekvote To display the players votes for the current week
%monthvote To display the player's votes for the current month
%totalrefer To display the player's total referrals on the server
%todayrefer To display the players's referrals for the current day
%weekrefer To display the player's referrals for the current week
%monthrefer To display the player's referrals for the current month
%totalpoint To display the player's current point balance



One of the lines on the sign must also include the name of the player. The player is specified with:

%%playerName Where "playerName" is replaced with the name of the player when creating the sign. Please note that unlike the other keywords, this one requires a double "%%" at the beginning.

If a player's name is greater in lengh than can fit when the "%%" is used, it will be automatically completed by the plugin.

If a portion of a player's name is used when defining the sign, and that portion is unique to a player, the plugin will automatically complete the player's name.

Any other text entered on the sign, including ones that start with "%" but is not a token, will remain unaltered by the plugin.

As soon as the sign is completed the plugin will remove the "%%" from in front of the player's name, and is an indication that the sign has been processed by the plugin.

Customizing Player Signs

There are several aspects of the player signs that can be customized by the admin, and these are configured via the OnSign/config.yml file.

Color and Text for Player Status

It is possible to configure the color and the words displayed on the sign for the "%status" information. Each of the three valid states "online", "offline", and "afk" can be set by modifying the following in the config.yml. By including a "color code" in front of each of the texts the admin can specify the color to be used.

Likewise the admin can also set the color used to display the player's name as well as the color used for time, vote, and referral counts.

The color code key can be found at the bottom of this page, and it is also included in the config.yml file.

   status:
      online: '&aONLINE'
      offline: '&4OFFLINE'
      afk: '&cAFK'
   playerColor: '&0'
   timeColor: '&0'


http://dev.bukkit.org/media/images/62/615/OnSign_Example_1a.jpg http://dev.bukkit.org/media/images/62/616/OnSign_Example_1b.jpg

Top Sign

(NOTE: Top Signs will be introduced with OnSign V1.2 which is still under production but coming soon!)

Unlike the player sign, the "top" signs require a more exact set of lines to be entered when creating the sign

First Line

The first line of a "top" sign must contain "%top". Simple enough. (There is one exception to this which will be covered at the end of this section.)

Second Line

Specify the data to be displayed on the sign. It is pretty much the same set of information as what can be put on a player sign.

%totalplay To display the players with the most total play time on the server
%todayplay To display the players with the most play time for the current day
%weekplay To display the players with the most play time for the current week
%monthplay To display the players with the most play time for the current month
%totalvote To display the players with the most votes on the server
%todayvote To display the players with the most votes for the current day
%weekvote To display the players with the most votes for the current week
%monthvote To display the players with the most votes for the current month
%totalrefer To display the players with the most referrals on the server
%todayrefer To display the players with the most referrals for the current day
%weekrefer To display the players with the most referrals for the current week
%monthrefer To display the players with the most referrals for the current month
%totalpoint To display the players with the highest current point totals

Third Line

Specify the place (1st, 2nd, 3rd, etc.) to be displayed on this sign. If '1' is specified it will be the player with the most time played, or votes cast, etc. If '2' is specified it will be the player with second most time played, etc. When writing this line the number must be proceeded with a "%#". For example "%#1".

Fourth Line

Anything placed here will be ignored since OnSign uses all four lines to display the "top player" information.

http://dev.bukkit.org/media/images/62/609/OnSign_Example_2.jpg http://dev.bukkit.org/media/images/62/610/OnSign_Example_3.jpg

First Line Exception

If you want to create a whole "top ten" set of signs, there is a short cut provided to make creation of multiple signs easier.

Define the first sign of the "top set" as explained above. When the second sign is placed, instead of using "%top" on the first line, use "%top+". (Notice the added "+"). And then save the sign!

OnSign will copy all of the information of the previous sign made, and it will increment the place (1st, 2nd, 3rd, etc.) by one. To make more signs for the "top set", simply place another sign and again put "%top+" on the first line of the sign and save.

http://dev.bukkit.org/media/images/62/611/OnSign_Example_4.jpg http://dev.bukkit.org/media/images/62/612/OnSign_Example_5.jpg

Customizing Top Signs

There are also several aspects of the top signs that can be customized by the admin, and these are configured via the OnSign/config.yml file. Each of the four lines in a top sign have different customization settings.

Top Sign - Line 1

The admin can configure the color and words displayed for the 'type' of top player, and each of the valid types "player", "voter", and "referrer" can be customized. By including a "color code" in front of each of the texts the admin can specify the color to be used.

The admin can also set the color for the rank order for the information displayed, e.g. "#1", "#2", "#3", etc. For this particular configuration different colors can be specified for each of the rank numbers, by listing more than one color code in the 'rankingColor' definition, separated by commas (,). The colors specified will repeat in the same order for all top signs defined.

The color code key can be found at the bottom of this page, and it is also included in the config.yml file.

Example 1:

If the following setting is used for rankingColor, then all rank numbers will be displayed using 'red'.

# Settings for the first line of TOP signs
   rankingColor: '&c'
Example 2:

If the following setting is used for rankingColor, then the "#1" will be 'red' on one sign, while the "#2" will be 'yellow' on another sign. If there is also a third place sign, then 'red' will again be used for "#3", and likewise a fourth place sign will find the "#4" in 'yellow', and so on.

From config.yml:

# Settings for the first line of TOP signs
   rankingColor: '&c,&e'

Top Sign - Line 2

The admin can configure the color and words displayed for the 'time scope' of top data displayed, and each of the valid time scopes "total", "daily", "weekly", and "monthly" can be customized. By including a "color code" in front of each of the texts the admin can specify the color to be used.

From config.yml:

# Settings for the second line of TOP Signs
   total: '&0Of All Time'
   today: '&0today'
   week: '&0this week'
   month: '&0this month'

Top Sign - Line 3

The admin can configure the color and word displayed when there is no player for the rank displayed on a particular sign. They can also set the color used for any player's name that is displayed, and just like the "rankingColor" above, multiple color codes can be specified by separating them via commas (,). Also as with the 'rankingColor' the colors specified will repeat as needed for all defined signs in a Top Set.

From config.yml:

# Settings for the third line of TOP Signs
   playerColor: '&0'
   noPlayer: '&0Nobody'

Top Sign - Line 4

The admin can set the color used for data (time, vote count, or rank count) that is displayed, and just like the "rankingColor" above, multiple color codes can be specified by separating them via commas (,). Also as with the 'rankingColor' the colors specified will repeat as needed for all defined signs in a Top Set.

Additionally the admin can configure the color and words displayed for the vote and referral units, and by including a "color code" in front of each of the texts the admin can specify the color to be used. There is also a setting for when no data is available that meets the definition of a sign.

From config.yml:

# Settings for the fourth line of TOP Signs
   timeCountColor: '&0'
   voteCount: "&0votes"
   referCount: "&0refs"  
   pointCount: "&0points"
   noData: "&0N/A"

Shop Signs

Shop signs are the easiest of the three types to set up because only the first line is required. The other three lines can contain any text desired by the admin.

First Line

The first line of a Shop Sign must have contain the RewardTag of the shop reward to be associated with that sign. Like the other types of signs the "%" character is used to indicate that this is an OnSign. A RewardTag is specified within OnTime when an reward is defined. The only requirement on the RewardTag is that it be less than 14 characters so that it will fit on the sign along with the "%" token.

For example if I have a reward with a RewardTag of "diamondShop", then I would put "%diamondShop" on the first line of my sign.

Lines 2 - 4

The rest of the lines can contain any text, which most often would describe the reward to be gained and the cost, when the sign is clicked by a player.

Example 1

On my server I want to allow players to spend their 'loyalty points' and buy diamonds. In OnTime I have created a shop reward where one diamond costs 500 "points", which has a RewardTag of "diamondShop". To create the sign shop, I will simply need to put "%diamondShop" on the first line, and then use the rest of the lines to tell the player what they get and at one cost. Like this:

http://dev.bukkit.org/media/images/66/323/OnSign_Example_7a.jpg
After clicking "DONE", OnSign will replace the first line with a configurable title, and is an indication that the sign configuration was valid.

http://dev.bukkit.org/media/images/66/316/OnSign_Exmaple_7b.jpg

Example 2

In this example I want to create another shop, but this time I want players to be able to promote themselves to the "Builder" rank using Points (cost=1000 points) they have earned. Setting this up is very similar to the diamond shop I created above. In OnTime I havecreated a shop reward where a promotion to 'Builder' costs 1000 "points", which has a RewardTag of "builderShop". To create the sign shop, I will simply need to put "%builderShop" on the first line, and then use the rest of the lines to tell the player what they get and at one cost. Such as this:

http://dev.bukkit.org/media/images/66/328/OnSign_Example_8a.jpg
After clicking "DONE", OnSign will replace the first line with a configurable title, and is an indication that the sign configuration was valid.

http://dev.bukkit.org/media/images/66/329/OnSign_Example_8b.jpg

Example 3

In this last shop example I want to create a shop on my server that player's can click on to buy the "ontime.other" permission (allows them to use the "/ontime <playerName>" command to see other player's OnTime stats) for a 24 hour period, at a cost of 200 coins. In OnTime I have created a shop reward where the permission of "ontime.other" is granted for the cost of 200 coins. This reward has a RewardTag of "otherShop".

To create the sign shop, I must put "%otherShop" on the first line, and then I can use the rest of the lines to tell the player about the shop reward. Such as this:
http://dev.bukkit.org/media/images/66/365/OnSign_Example_9a.jpg
Again, clicking "Done" will have OnSign verify the sign contents, and change the first line to indicate acceptance.
http://dev.bukkit.org/media/images/66/366/OnSign_Example_9b.jpg

Customizing Shop Signs

There are also several aspects of the shop signs that can be customized by the admin, and these are configured via the OnSign/config.yml file.

Currently text color customizations are NOT supported by shop signs. (No technical reason, I simply forgot to add it in the v1.3.0.)

When shop signs are created, the first line of the sign where the admin specifies the RewardTag of the reward shop is automatically replaced with common text used for all point or econ shops. This string can be set by modifying the following in the config.yml.

# Shop Sign Configuration / Messages
shop:
# The title will be put automatically at the top of each sign
   pointShopTitle: 'Point Shop'
   econShopTitle: 'Server Shop'

There is a message displayed to players when they have an unsuccessful purchase attempt. This message is also configurable via the OnSign/config.yml.

# Message displayed to user on unsuccessful purchase   
   error: 'Purchase unsuccessful'

There are other messages related to shop signs that a player will see upon successful and unsuccessful purchases, and these are configured via the OnTime plugin in the plugins/OnTime/output.yml file.

#
# Shop Related Output
#
   shop:
     noPermission:
       lines: 1
       line-1: '[player] you do not have permission to make that purchase.'
     noRankChange:
       lines: 1
       line-1: '[player] you are not eligible for [rewardString]'
     noFunds:
       lines: 2
       line-1: '[player] you do not have enough [$]'
       line-2: 'Your current balance is [balance]'
     noPoints:
       lines: 2
       line-1: '[player] you do not have enough Loyalty Points'
       line-2: 'Your point balance is [points]'
     notEligible:
       lines: 1
       line-1: '[player] you not eligible to make that purchase.'
     success:
       lines: 1
       line-1: '[player] your shop order has been placed.'

Sign Updates

Server Start

On server start or plugin reload, all of the player and top OnSigns will be updated

Player Logon or Logoff

A particular player's sign will be updated anytime that player logs on, logs off, or changes AFK status. (The AFK status change is determined by the OnTime plugin, so OnTime's AFK function must be enabled for this to work.)

Upon Auto Update Interval

The server admin can configure via the OnSign/config.yml an an auto-update interval. As specified, all player and top signs will be refreshed every XX minutes by the plugin. The default is set to 10 minutes.

Color Codes

# Color Codes
# Note when using color on signs, the color codes take up 4 characters of the 15 characters on a line
# so, if your playernames or other info is getting clipped, you may want to remove the color coding
# 
#  &0	Black
#  &1	Dark Blue
#  &2	Dark Green
#  &3	Dark Aqua
#  &4	Dark Red
#  &5	Dark Purple
#  &6	Gold
#  &7	Gray
#  &8	Dark Gray
#  &9	Blue
#  &a	Green
#  &b	Aqua
#  &c	Red
#  &d 	Light Purple
#  &e	Yellow
#  &f	White
#