add 'entity.despawn' command

This commit is contained in:
MihailRis
2024-07-17 07:35:02 +03:00
parent c9958c9718
commit 41a22938d6
8 changed files with 41 additions and 5 deletions
+2 -2
View File
@@ -140,8 +140,8 @@ static int l_get_selected_block(lua::State* L) {
static int l_get_selected_entity(lua::State* L) {
if (auto player = get_player(L, 1)) {
if (player->selection.entity) {
return lua::pushinteger(L, player->selection.entity);
if (auto eid = player->getSelectedEntity()) {
return lua::pushinteger(L, eid);
}
}
return 0;