documentation
This commit is contained in:
parent
3c178450c4
commit
35443e6734
2 changed files with 41 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
load(__folder + "../utils/text.js");
|
load(__folder + "../utils/text.js");
|
||||||
/*
|
/*
|
||||||
Define the signs module - signs are persistent
|
Define the signs module - signs are persistent
|
||||||
|
@ -207,14 +208,13 @@ var signs = signs || plugin("signs", {
|
||||||
*/
|
*/
|
||||||
if (! event.clickedBlock.state instanceof org.bukkit.block.Sign)
|
if (! event.clickedBlock.state instanceof org.bukkit.block.Sign)
|
||||||
return;
|
return;
|
||||||
var evtLocStr = locationToString(event.clickedBlock.location);
|
var evtLocStr = utils.locationToString(event.clickedBlock.location);
|
||||||
var signUpdater = signs._updaters[evtLocStr]
|
var signUpdater = signs._updaters[evtLocStr]
|
||||||
if (signUpdater)
|
if (signUpdater)
|
||||||
signUpdater(event.player, event.clickedBlock.state);
|
signUpdater(event.player, event.clickedBlock.state);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,42 @@
|
||||||
/*
|
/************************************************************************
|
||||||
Just a bunch of text-related extensions to the String class
|
String class extensions
|
||||||
*/
|
-----------------------
|
||||||
|
The following chat-formatting methods are added to the javascript String class..
|
||||||
|
|
||||||
|
* black()
|
||||||
|
* darkblue()
|
||||||
|
* blue()
|
||||||
|
* darkgreen()
|
||||||
|
* darkaqua()
|
||||||
|
* darkred()
|
||||||
|
* purple()
|
||||||
|
* gold()
|
||||||
|
* gray()
|
||||||
|
* darkgray()
|
||||||
|
* indigo()
|
||||||
|
* brightgreen()
|
||||||
|
* green()
|
||||||
|
* aqua()
|
||||||
|
* red()
|
||||||
|
* pink()
|
||||||
|
* yellow()
|
||||||
|
* white()
|
||||||
|
* bold()
|
||||||
|
* random()
|
||||||
|
* strike()
|
||||||
|
* underline()
|
||||||
|
* italic()
|
||||||
|
* reset()
|
||||||
|
|
||||||
|
Example
|
||||||
|
-------
|
||||||
|
|
||||||
|
var boldGoldText = "Hello World".bold().gold();
|
||||||
|
self.sendMessage(boldGoldText);
|
||||||
|
|
||||||
|
<p style="color:gold;font-weight:bold">Hello World</p>
|
||||||
|
|
||||||
|
***/
|
||||||
(function(){
|
(function(){
|
||||||
var formattingCodes = {
|
var formattingCodes = {
|
||||||
black: 0,
|
black: 0,
|
||||||
|
|
Reference in a new issue