It's pretty easy:
-- Player is a cPlayer object
local SelectedCuboid = cCuboid()
cPluginManager:CallPlugin("WorldEdit", "GetPlayerCuboidSelection", Player, SelectedCuboid)
-- Do stuff with the selected cuboid
Also, your previous code would've given an error. You're returning a table to a different plugin. You can only pass numbers, booleans, strings and usertypes (cPlayer, cEntity, cCuboid, etc.). This means NO tables, arrays, lists, etc. You could've returned all the other variables.
-- In your fnString function
return Sel:GetXCoordsSorted(), Sel:GetYCoordsSorted(), Sel:GetZCoordsSorted()
-- Get the variables.
local MinX, MaxX, MinY, MaxY, MinZ, MaxZ = cRoot:Get():GetPluginManager():CallPlug...
And no, the FindAndDoWithPlayer part wouldn't work. The syntax is still valid, but it would crash because you would try to get the selection member of a bool value.
What would've worked is this:
local Sel;
cRoot:Get():FindAndDoWithPlayer(a_Player,
function(a_Player)
Sel = GetPlayerState(a_Player).Selection
end
)