public bool CanUserBuild(ManicDiggerServer.Server.Client client) { if (this.isGuestAllowed) return true; else if (this.isUserAllowed && !client.playername.StartsWith("~")) return true; else if (this.isBuilderAllowed && client.CanBuild) return true; else if (this.isAdminAllowed && client.IsAdmin) return true; else { foreach (String user in this.usersAllowed) { if (client.playername == user) return true; } } return false; }
public bool CanUserBuild(ManicDiggerServer.Server.Client client, int x, int y) { bool canBuild = true; foreach (AreaConfig area in this.Areas) { if (area.IsInCoords(x, y)) { if (!area.CanUserBuild(client)) { return false; } } } return canBuild; }