mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
if creative mode and player has no build privileges, cannot drop items.
This commit is contained in:
@@ -2923,6 +2923,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
If in creative mode, item dropping is disabled unless
|
||||||
|
player has build privileges
|
||||||
|
*/
|
||||||
|
if(g_settings.getBool("creative_mode") &&
|
||||||
|
(getPlayerPrivs(player) & PRIV_BUILD) == 0)
|
||||||
|
{
|
||||||
|
derr_server<<"Not allowing player to drop item: "
|
||||||
|
"creative mode and no build privs"<<std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dout_server<<"Placing a miscellaneous item on map"
|
dout_server<<"Placing a miscellaneous item on map"
|
||||||
<<std::endl;
|
<<std::endl;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user