04-13-2012, 06:07 AM
If I were to write something like this, I'd go about it in a different way. I'd use the existing structure of Permissions and UserGroups:
groups.ini:
users.ini:
plugin pseudocode:
groups.ini:
Code:
[World1Builders]
Permissions=buildinworld.world1
[World2Builders]
Permissions=buildinworld.world2
users.ini:
Code:
[Name1]
Groups=World1Builders,World2Builders
[Name2]
Groups=World2Builders
[Name3]
Groups=World1Builders
[MyAdminName]
Groups=Admins
plugin pseudocode:
Code:
function OnBlockDig( PacketData, Player )
WorldName = Player.GetWorld().GetName()
return Player.HasPermission("buildinworld." + WorldName)
end