Update Anatomy-of-a-Plugin.md

This commit is contained in:
Walter Higgins 2014-09-17 14:23:38 +01:00
parent 127697f774
commit f2e54d2168

View file

@ -46,7 +46,7 @@ chosen color...
var colorCodes = {};
for (var i =0;i < colors.length;i++) colorCodes[colors[i]] = i.toString(16);
events.on( 'player.AsyncPlayerChatEvent', function( evt ) {
events.asyncPlayerChat( function( evt ) {
var player = evt.player;
var playerChatColor = _store.players[ player.name ];
if ( playerChatColor ) {
@ -112,7 +112,7 @@ code is just a couple of lines of code but is a fully working plugin...
colorCodes[ colors[i] ] = i.toString(16);
}
events.on( 'player.AsyncPlayerChatEvent', function( evt ) {
events.asyncPlayerChat( function( evt ) {
var player = evt.player;
var playerChatColor = _store.players[player.name];
if ( playerChatColor ) {