fix: fixed action handlers
This commit is contained in:
parent
499029d456
commit
01c70e8339
@ -14,7 +14,7 @@ public class DialogDialogActionHandler implements DialogActionHandler {
|
||||
public void handle(DialogButtonClick click, Params params) {
|
||||
var player = click.player();
|
||||
|
||||
if (params.contains("dialogId")) {
|
||||
if (!params.contains("dialogId")) {
|
||||
DebugMessage.sendError(player, "Отсутствует обязательный параметр dialogId для команды dialog");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ public class ScriptDialogActionHandler implements DialogActionHandler {
|
||||
public void handle(DialogButtonClick click, Params params) {
|
||||
var player = click.player();
|
||||
|
||||
if (params.contains("scriptId")) {
|
||||
if (!params.contains("scriptId")) {
|
||||
DebugMessage.sendError(player, "Отсутствует обязательный параметр scriptId для команды script");
|
||||
return;
|
||||
}
|
||||
@ -27,6 +27,7 @@ public class ScriptDialogActionHandler implements DialogActionHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
click.renderer().close(false);
|
||||
ScriptService.ofPlayer(player).start(script.get(), params);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user