fix: fix FloatingText
This commit is contained in:
@@ -105,10 +105,6 @@ class StaticFloatingText {
|
|||||||
this.mPlaceholderAPI = papi;
|
this.mPlaceholderAPI = papi;
|
||||||
this.mRuntimeId = GMLIB_API.createFloatingText(this.mPosition, this.mText, this.mPlaceholderAPI);
|
this.mRuntimeId = GMLIB_API.createFloatingText(this.mPosition, this.mText, this.mPlaceholderAPI);
|
||||||
FloatingTextList.push(this);
|
FloatingTextList.push(this);
|
||||||
this.sendToClients();
|
|
||||||
mc.listen("onJoin", (pl) => {
|
|
||||||
this.sendToClient(pl);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sendToClient(player) {
|
sendToClient(player) {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void Export_Compatibility_API() {
|
|||||||
"GMLIB_API",
|
"GMLIB_API",
|
||||||
"createFloatingText",
|
"createFloatingText",
|
||||||
[](std::pair<Vec3, int> pos, std::string text, bool papi) -> int {
|
[](std::pair<Vec3, int> pos, std::string text, bool papi) -> int {
|
||||||
auto ft = new GMLIB::Server::FloatingText(text, pos.first, pos.second, papi);
|
auto ft = new GMLIB::Server::StaticFloatingText(text, pos.first, pos.second, papi);
|
||||||
return ft->getRuntimeID();
|
return ft->getRuntimeID();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user