mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Added protection commands
This commit is contained in:
@@ -72,9 +72,15 @@ end
|
||||
|
||||
--- Test if a player is selecting something
|
||||
-- @tparam LuaPlayer player The player to test
|
||||
function Selection.is_selecting(player)
|
||||
-- @tparam[opt] string selection_name If given will only return true if the selection is this selection
|
||||
function Selection.is_selecting(player, selection_name)
|
||||
if selection_name ~= nil then
|
||||
if not selections[player.index] then return false end
|
||||
return selections[player.index].name == selection_name
|
||||
else
|
||||
return player.cursor_stack.is_selection_tool
|
||||
end
|
||||
end
|
||||
|
||||
--- Filter on_player_selected_area to this custom selection, pretends with player and appends with selection arguments
|
||||
-- @tparam string selection_name The name of the selection to listen for
|
||||
|
||||
Reference in New Issue
Block a user