Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
1.9.0更新,表单回传新增player
Browse files Browse the repository at this point in the history
  • Loading branch information
twoone3l committed Jan 14, 2022
1 parent fca883a commit fbfba43
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
mkdir Tools/Server
ServerLink=$(curl -s https://raw.githubusercontent.com/LiteLDev/LiteLoaderBDS/main/LINK.txt)
ServerLink=$(curl -s https://raw.githubusercontent.com/LiteLDev/LiteLoaderBDS/main/Scripts/LINK.txt)
curl -L -o Tools/Server/server.zip "$ServerLink"
unzip -q Tools/Server/server.zip -d Tools/Server/
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions mod/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ struct PyEntity {
if (!PyFunction_Check(callback))
return nullptr;
p->sendCustomFormPacket(str,
[callback](string arg) {
[p, callback](string arg) {
PyGILGuard gil;
PyObject* result = PyObject_CallFunction(callback, "s", arg.c_str());
PyObject* result = PyObject_CallFunction(callback, "Os", ToEntity(p), arg.c_str());
PrintPythonError();
Py_XDECREF(result);
}
Expand All @@ -405,9 +405,9 @@ struct PyEntity {
if (buttons.size() != images.size())
Py_RETURN_ERROR("The number of buttons is not equal to the number of images");
p->sendSimpleFormPacket(title, content, buttons, images,
[callback](int arg) {
[p, callback](int arg) {
PyGILGuard gil;
PyObject* result = PyObject_CallFunction(callback, "i", arg);
PyObject* result = PyObject_CallFunction(callback, "Oi", ToEntity(p), arg);
PrintPythonError();
Py_XDECREF(result);
}
Expand All @@ -425,9 +425,9 @@ struct PyEntity {
if (!PyFunction_Check(callback))
return nullptr;
p->sendModalFormPacket(title, content, button1, button2,
[callback](bool arg) {
[p, callback](bool arg) {
PyGILGuard gil;
PyObject* result = PyObject_CallFunction(callback, "O", arg ? Py_True : Py_False);
PyObject* result = PyObject_CallFunction(callback, "OO", ToEntity(p), arg ? Py_True : Py_False);
PrintPythonError();
Py_XDECREF(result);
}
Expand Down
2 changes: 1 addition & 1 deletion mod/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
constexpr unsigned PYR_MAJOR_VERSION = 1;
constexpr unsigned PYR_MINOR_VERSION = 9;
constexpr unsigned PYR_MICRO_VERSION = 0;
constexpr const char* PYR_VERSION = "v1.9.0_preview_3";
constexpr const char* PYR_VERSION = "v1.9.0";

0 comments on commit fbfba43

Please sign in to comment.