Skip to content

Commit

Permalink
add some anticheat measures
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Aug 29, 2020
1 parent b50cbff commit e3009dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions anticheat/inv_move.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info)
local inventory_location = inventory:get_location()
if inventory_location.type == "player" and inventory_location.name ~= player:get_player_name() then
return 0
end
end)
3 changes: 3 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pandorabox = {}

local MP = minetest.get_modpath("pandorabox_custom")

-- anticheat stuff
dofile(MP .. "/anticheat/inv_move.lua")

-- unknown item aliasing
dofile(MP.."/alias.lua")

Expand Down

0 comments on commit e3009dc

Please sign in to comment.