Ой, точно, это ж JS, тут в кейсах брейки нужны, я забыл.
Извиняюсь, исправил:
//=============================================================================
// TitleWindowTextCenter.js
//=============================================================================
/*:
* @plugindesc Set title window text align to center.
* @author DeadElf79
*
* @param Align
* @desc 0 - left, 1 - center, 2 - right
* @default 1
*
* @help This plugin does not provide plugin commands.
*/
(function() {
var parameters = PluginManager.parameters('TitleWindowTextCenter');
var userButtonAlign = Number(parameters['Align'] || 1);
Window_TitleCommand.prototype.initialize = function() {
this.buttonAlign = userButtonAlign;
Window_Command.prototype.initialize.call(this, 0, 0);
this.openness = 0;
this.updatePlacement();
this.selectLast();
};
Window_TitleCommand.prototype.drawItem = function(index) {
var rect = this.itemRectForText(index);
switch (this.buttonAlign) {
case 0:
var align = 'left';
break;
case 1:
var align = 'center';
break;
case 2:
var align = 'right';
break;
}
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawText(this.commandName(index), rect.x, rect.y, rect.width, align);
};
})();
Теперь все работает, как надо: