1-239氏の盗み仕様変更見ればいいと言おうと思ったけど今は入ってないみたいなので

var UnitCommand = defineObject(BaseListCommandManager, の中にある
configureCommands: function(groupArray) { を切り出す場合

UnitCommand.configureCommands = function(groupArray) {
groupArray.appendObject(UnitCommand.Item);
groupArray.appendObject(UnitCommand.Trade);

};

↑のようにUnitCommandとconfigureCommandsを.で繋いで、間の:を=に変えるといい
俺もあんまりスクリプトに詳しいわけじゃないけどプラグインに切り出す時はこのやり方で大体いける